Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,569,881 | 1 | 4,155,446 | null | 1 | 862 | I have two dimensions sorting bug in IE8 and below.
IE just doesn't know to handle this thing.

As you can see, there are two levels of sorting items. Two dimensions.
In all of the browsers this thing works perfect. Only IE get crazy.
```
$("#experienciasProfissionais").sortable({
placeholder: 'ui-state-highlight',
cursor: 'n-resize',
handle: '.drag',
axis: 'y',
revert: true,
over: function (event, ui) {
ui.placeholder.css('height', ui.item.css('height'));
},
tolerance: 'intersect'
});
$("#experienciasProfissionais > li > ul").sortable({
placeholder: 'ui-state-highlight',
cursor: 'n-resize',
axis: 'y',
revert: true,
over: function (event, ui) {
ui.placeholder.css('height', ui.item.css('height'));
},
tolerance: 'intersect'
});
```
The moment I let the first JQ object to run, everything gets messed up. He accept only one level of sorting. 2 are totally forbidden.
In FF & Chrome everything is just fine. Only IE gives the creeps.
| Two dimensions jquery sortable retrieves a bug in IE | CC BY-SA 3.0 | null | 2010-08-25T20:17:22.727 | 2017-04-03T14:15:46.480 | 2017-04-03T14:15:46.480 | 1,033,581 | 279,591 | [
"jquery",
"css",
"internet-explorer-8",
"internet-explorer-7",
"jquery-ui-sortable"
] |
3,570,373 | 1 | 11,142,056 | null | 3 | 2,854 | Is there any way to prevent '?' from being treated as white-space-like in HTML/CSS? Is this default behavior, or am I doing something wrong?
I have a div that holds a very long URL (the length is dynamic). I want the URL to treat the question mark as any other character and not force a line break at that character, but I want to use `white-space:nowrap;`, since that will cause the entire line to overflow out of the div, which is not a desired behavior.
The desired behavior is for the text to wrap at the end of the div onto the next line, as it would if it weren't for the question mark.

It likely doesn't matter, but here are their CSS properties:
```
a{color:green; font-weight: bold;} .ycpreviewbox{ margin: 0 auto; padding: 2em; background-color: #C7E2ED;} .
```
Here is how it behaves with a shorter URL:

| Prevent ? (question mark) from being treated as a white-space like separator | CC BY-SA 2.5 | null | 2010-08-25T21:31:16.517 | 2012-06-21T15:56:59.457 | null | null | 172,322 | [
"html",
"css",
"word-wrap"
] |
3,570,898 | 1 | 3,578,991 | null | 1 | 2,649 | I am not sure this is even possible without modifying the Admin interface.
I have a model called "Quote" that can contain multiple "Product" models. I connect the two using an intermediate model "QuoteIncludes". Here are the three models as they currently stand:
```
class Product(models.Model):
name = models.CharField(max_length=100)
short_desc = models.CharField(max_length=200)
default_cost = models.DecimalField(max_digits=15, decimal_places=2)
default_price = models.DecimalField(max_digits=15, decimal_places=2)
shipping_per_unit = models.DecimalField(max_digits=9, decimal_places=2)
weight_in_lbs = models.DecimalField(max_digits=5, decimal_places=2)
def __unicode__(self):
return self.name
class Quote(models.Model):
## Human name for easy reference
name = models.CharField(max_length=100)
items = models.ManyToManyField(Product, through='QuoteIncludes')
def __unicode__(self):
return self.name
class QuoteIncludes(models.Model):
## Attach foreign keys between a Quote and Product
product = models.ForeignKey(Product)
quote = models.ForeignKey(Quote)
## Additional fields when adding product to a Quote
quantity = models.PositiveIntegerField()
per_unit_cost = models.DecimalField(max_digits=15, decimal_places=2)
per_unit_price = models.DecimalField(max_digits=15, decimal_places=2)
def _get_extended_price(self):
"""Gets extended price by multiplying quantity and unit price."""
if self.quantity and self.per_unit_price:
return self.quantity * self.per_unit_price
else:
return 0.00
extended_price = _get_extended_price
```
What I would like to be able to do is create a Quote in the Admin interface such that when I've filled in both the quantity and the per_unit_price of a line item, it fills in the "extended_price" as a product of the two when I tab over. I think it requires adding some AJAX in there.

| Django: Update Field Value Based on Other Fields | CC BY-SA 2.5 | null | 2010-08-25T23:04:34.197 | 2010-08-26T20:36:23.760 | null | null | 114,786 | [
"python",
"django",
"methods",
"django-admin",
"admin"
] |
3,571,179 | 1 | 3,571,949 | null | 45 | 5,618 | It probably happened to you as well - sometimes when you copy a text from some web page into your rich-text e-mail draft in your favorite webmail client, you dislike the fact that the pasted has a different font/size/weight.. it somehow remembers the style (often images, when selected). How is it than that if you paste the same into your favorite text editor like Vim, there's no HTML, just the plain text?

It seems that clipboard maintains the selected data in various formats. How can one access data in any one of those formats (programmatically or with some utility)? How does the X11 clipboard work?
| How does X11 clipboard handle multiple data formats? | CC BY-SA 2.5 | 0 | 2010-08-26T00:08:15.540 | 2019-11-19T07:38:39.697 | 2010-09-08T07:05:11.433 | 300,863 | 234,248 | [
"text",
"clipboard",
"x11",
"xorg"
] |
3,571,413 | 1 | 3,594,757 | null | 3 | 20,981 | Any suggestions how to create a line by clicking two new points then draw a line between them?
I am trying to create a distance tool like the one in adobe acrobat.
Image Example

| Click two new points and draw a line between those two points using mouse event | CC BY-SA 2.5 | 0 | 2010-08-26T01:12:01.497 | 2010-08-31T23:31:20.790 | 2010-08-31T23:22:13.290 | 416,801 | 416,801 | [
"c#",
"events",
"graphics",
"gdi+"
] |
3,571,718 | 1 | 3,574,565 | null | 2 | 4,293 | I want to create a windows style error popup for my Cocoa application like this one

Is there any tutorial how to do this? Or can somebody give me at least the names of a few API functions that i need to check out.
| How can i create a transparent and non rectangular NSWindow with Cocoa? | CC BY-SA 2.5 | null | 2010-08-26T02:48:37.303 | 2012-12-19T00:17:08.083 | null | null | 155,082 | [
"cocoa",
"nswindow"
] |
3,571,863 | 1 | 3,571,935 | null | 3 | 4,279 | Hi want to get a date list between start date and end date. For example start date is 27-08-2010 and end date is 31-08-2010. So the date list is 27-08-2010,30-08-2010 and 31-08-2010. 29-08-2010 and 30-08-2010 will be ignore because it is in the weekend. I attach the picture for more clearer explanation. How to achieve this using javascript or jquery? I only want to get the list of date, for the business day calculation already done.

| How to get date between start date and end date? (excluding date on weekend) | CC BY-SA 2.5 | 0 | 2010-08-26T03:35:28.177 | 2010-08-26T05:45:24.400 | 2010-08-26T05:12:03.233 | 417,899 | 417,899 | [
"javascript",
"jquery"
] |
3,572,049 | 1 | 3,581,324 | null | 0 | 222 | i have a Air Project in which i have added three extenal source folders.
but when i reopen project or strat flash builder again i get icon on those folder like this
##
but when i open the configuration for that project and try to validate the path and adding it again i get message like this

but the path is valid. proof is this pic

---
what could be possible error,,, is there any way that i when ever re-open project i get no warning and able to navigate through the linked source code. now i am doing it
1- deleting on of the linked folder
2- again adding that folder.
| Source from external Folder (linked Source) not appearing in Flex? | CC BY-SA 2.5 | 0 | 2010-08-26T04:29:14.130 | 2010-08-27T04:26:52.260 | null | null | 225,402 | [
"apache-flex",
"actionscript-3",
"flash-builder"
] |
3,572,121 | 1 | 3,572,179 | null | 0 | 33 | I want to insert char (A) in second index where code start with 's'
Input
s1
s2
s34
Require output
sA1
sA2
sA34
```
Update T1
set code = ??
where code like 's%'
```

| set column to insert extat charachter in Sql Server | CC BY-SA 2.5 | null | 2010-08-26T04:46:34.163 | 2010-08-26T05:15:29.013 | 2010-08-26T05:01:17.557 | 178,271 | 178,271 | [
"sql-server-2005"
] |
3,572,466 | 1 | 3,572,550 | null | 1 | 182 | My sinatra app runs fine locally (see screenshot below) but when I push it to heroku it crashes and I get this error
```
RegexpError - undefined (?...) sequence: /(?<=(LIST ALL SELECTED ))\w/:
```
The line of code where the occurs is
```
match = data.match('(?<=(LIST ALL SELECTED ))\w')[0]
```
What I am trying to do is capture the next letter directly after 'LIST ALL SELECTED '
Any insite to what this means would be greatly appreciated.
Thanks.

| Sinatra app running on Heroku has RegexpError | CC BY-SA 3.0 | null | 2010-08-26T06:12:06.020 | 2011-08-17T21:30:12.010 | 2011-08-17T21:30:12.010 | 318,465 | 160,917 | [
"ruby",
"regex",
"sinatra",
"heroku"
] |
3,572,468 | 1 | 3,573,124 | null | 0 | 343 | I really like Nokola's NavSeven Silverlight Bar.
You can take a look at it here: [http://www.nokola.com/sources/](http://www.nokola.com/sources/)
You can notice right away that the Navigation Bar stretches all the way to 100% and icons are nicely aligned in the middle.
The navigation bar itself is 900px wide in Page.xaml.
I've got it to work on my website but for some reason I cannot stretch it to 100% like on Nokola's site.
Here's what happens: I set width to 100% but instead of stretching, it stays at 900px wide and fills everything else with Whitespace. That's another problem - no matter what I change the background color to, it is always white which looks bad on my grey background of the website. But that's not really the point, it still doesn't stretch like it is supposed to, like it is on Nokola's website.
Here's the code I use to include my Silverlight file:
```
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="43px">
<param name="source" value="ClientBin/NavSeven.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40624.0" />
<param name="autoUpgrade" value="true" />
<param name="enableGPUAcceleration" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration: none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
```

| Help with Nokola's NavSeven Silverlight navigation bar! | CC BY-SA 2.5 | null | 2010-08-26T06:13:31.977 | 2010-08-26T08:11:29.510 | 2010-08-26T06:20:16.143 | 274,117 | 274,117 | [
"asp.net",
"silverlight"
] |
3,572,736 | 1 | 3,591,973 | null | 2 | 3,402 | We are using TFS Build 2010 for Builds. We have two branches of source code (Lets say branchA and branchB).
Now as a part of the build definition we set the projects to build:

Now to employ the same build definition from branchB will mean that I create another build definition file with same content, with only the items to build set to "$/branchB"
Is there anyway to make this configurable, without having to edit the build definition?
Also there are other input variables that we set for the build definition, and the values for these variables are included in the build definition XAML file. So to change the value of a variable will mean that we have to edit the build definition XAML file. This is not desirable.
I would like to be able to set the "Items to Build" and the variables of the build definition without having to modify the build definition XAML file.
Are there any solutions to these problems?
| How to make build definition in TFS Build 2010 configurable w.r.t input variable values and "items to build" | CC BY-SA 2.5 | null | 2010-08-26T07:02:47.303 | 2011-08-11T00:51:50.313 | 2010-08-26T07:10:20.297 | 46,279 | 46,279 | [
"tfs",
"build-process",
"tfsbuild"
] |
3,572,829 | 1 | null | null | 12 | 15,973 | Any sample code for chart with multiple bars using flot ??
similar to [this example](http://code.google.com/p/flot/issues/detail?id=159) . The given patched files are not working for me. Anywhere I can download the latest files for multi bar graph.
I am sure Flot is a very good library but plugins/add-ons are not available easily and the examples given on the website are very basic, so I decided to use [jqPlot](http://www.jqplot.com/) instead
| Multi bar chat with Flot | CC BY-SA 2.5 | 0 | 2010-08-26T07:17:03.050 | 2014-02-25T18:20:47.017 | 2010-08-27T04:23:56.140 | 431,514 | 431,514 | [
"javascript",
"jquery",
"flot"
] |
3,572,946 | 1 | 3,598,828 | null | 2 | 8,242 | I programmed an application with JSF and some other fraeworks. Then I destroyed my metadata with maven and then I created a new project and imported all my classes and config files into the new project. So that I have clean metadata. The Project can be built without problems now. But when I want to start it onto tomcat I get the following exception:
```
com.sun.faces.config.ConfigurationException: no web.xml present
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.scanForFacesServlet(ConfigureListener.java:785)
at com.sun.faces.config.ConfigureListener$WebXmlProcessor.<init>(ConfigureListener.java:745)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:173)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
```
But there is definitely a `web.xml` in that project. Has somebody an idea where my mistake could be? Thank you
---
## Update
- Yes I am using m2Eclipse!- My directory tree looks like:
My Servlet is there as well:
```
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>
javax.faces.webapp.FacesServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
```
---
## UPDATE2
- [Here](http://www.mkyong.com/maven/how-to-convert-java-web-project-to-maven-project/)
---
## UPDATE3
Response to Pascal's comment:
- `mvn clean compile`- `mvn install` throws a build error: `[INFO] Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if execut ing in update mode)`
I executed those commands from windows console
---
Maybe the problem is something else. There is another Warning while starting the server:
```
27.08.2010 09:04:52 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:studentportal' did not find a matching property.
```
Maybe that helps?
| com.sun.faces.config.ConfigurationException: no web.xml present | CC BY-SA 2.5 | null | 2010-08-26T07:34:23.487 | 2011-02-07T13:33:32.000 | 2010-08-27T08:43:29.493 | 389,430 | 389,430 | [
"maven-2",
"tomcat",
"jsf",
"web.xml"
] |
3,573,573 | 1 | 3,574,653 | null | 7 | 727 | As a total beginner in Flash, I am on an assignment where I should create a fake progress bar that should go from 0% - 98%.
Right now I have my line of progress with a total white tween over it that goes from left to right to indicate the fake download. See picture.

While the tween is running I want to increase the percentage so it matches and stops with 98% - is it possible to do this? And how?
My document is in AS3, but there is no action script yet so it does not matter right now. I mostly do timeline.
Thank you!
| Faking progress bar | CC BY-SA 2.5 | 0 | 2010-08-26T09:01:28.303 | 2010-08-26T11:32:46.217 | null | null | 99,395 | [
"flash",
"actionscript-3",
"progress-bar"
] |
3,573,909 | 1 | 3,586,051 | null | 1 | 1,795 |
## CSV file:
```
#3GMACRO,,,,,,,,,,,,,,
,,,,,,,,,,,,,,
IMSI,IMEI,Date,Time,UMTS MACRO-UARFCNDL,UMTS MACRO-PrimaryScramblingCode,UMTS MACRO-CPICHTxPower,UMTS MACRO-PLMNCellId,UMTS MACRO- RNCId,UMTS MACRO-MCC,UMTS MACRO-MNC,UMTS MACRO - LAC,UMTS MACRO - RAC,UMTS MACRO - MaxUETxPower,UMTS MACRO - MeasuredRSCP
2.6275E+14,3.57539E+14,20100107,160000,10662,11,-99,268435456,0,0,0,1,0,0,-74
,,,,,,,,,,,,,,
#3GFEMTO,,,,,,,,,,,,,,
,,,,,,,,,,,,,,
IMSI,IMEI,Date,Time,UMTS FEMTOS-UARFCNDL,UMTS FEMTOS-PrimaryScramblingCode,UMTS FEMTOS-CPICHTxPower,UMTS FEMTOS-PLMNCellId,UMTS FEMTOS-RNCId,UMTS FEMTOS-MCC,UMTS FEMTOS-MNC,UMTS FEMTOS-LAC,UMTS FEMTOS-RAC,UMTS FEMTOS-MaxUETxPower,UMTS FEMTOS- MeasuredRSCP
2.6275E+14,3.57539E+14,20100107,160000,10687,252,-24,61,0,610,3956,486,11,5,-102
,,,,,,,,,,,,,,
#2GMACRO,,,,,,,,,,,,,,
,,,,,,,,,,,,,,
IMSI,IMEI,Date,Time,GSM MACRO_CellID,GSM MACRO-MCC,GSM MACRO-MNC,GSM MACRO-LAC,GSM MACRO-RAC,GSM MACRO-Max permitted UE Tx power (SIB3),GSM MACRO-Measure RSSI,,,,
2.6275E+14,3.57539E+14,20100107,160000,GSM_Cell_Id=1,2,3,4,5,6,7,,,,
```
i want this csv file to be loaded into an excel sheet as an individual section when I click load only once (ie each section should go to separate worksheet in excel)
CSV file contain Section name , header and data
Below are the section names in CSv file
# 3GMACRO
# 3GFEMTO
# 2GMACRO
Below are the Header names in CSv file
IMSI,IMEI,Date,Time,GSM MACRO_CellID,GSM MACRO-MCC,GSM MACRO-MNC............ etc
3 worksheets should have headers and data after loading CSV file.
Please help me in doing so.
Thanks in advance

hi
this is what the code i tried but its not working perfectly as needed.
```
Sub loadData()
'Runtime error handling
'On Error Resume Next
'Unprotect the password protected sheet for loading csv data
ActiveSheet.Unprotect Password:=pass
'Variable declaration
Dim strFilePath As String, strFilename As String, strFullPath As String
Dim lngCounter As Long
Dim oConn As Object, oRS As Object, oFSObj As Object
'Get a text file name
strFullPath = Application.GetOpenFilename("Text Files (*.csv),*.csv", , "Please select text file...")
'MsgBox "stringfullpath" & strFullPath
If strFullPath = "False" Then Exit Sub 'User pressed Cancel on the open file dialog
'This gives us a full path name e.g. C:tempfolderfile.txt
'We need to split this into path and file name
Set oFSObj = CreateObject("SCRIPTING.FILESYSTEMOBJECT")
strFilePath = oFSObj.GetFile(strFullPath).ParentFolder.Path
strFilename = oFSObj.GetFile(strFullPath).Name
'Open an ADO connection to the folder specified
Set oConn = CreateObject("ADODB.CONNECTION")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strFilePath & ";" & _
"Extended Properties=""text;HDR=Yes;FMT=Delimited"""
Set oRS = CreateObject("ADODB.RECORDSET")
'Now actually open the text file and import into Excel
'oRS.Open "SELECT * FROM " & strFilename & " , oConn"
oRS.Open "SELECT * FROM " & strFilename, oConn
While Not oRS.EOF
Sheets("Neighbour3GMacro").Range("A3").CopyFromRecordset oRS
'Sheets.Add Type:=Application.GetOpenFilename & " *.csv"
Sheets("Neighbour3GFemto").Range("A2").CopyFromRecordset oRS
Sheets("Neighbour2GMacro").Range("A2").CopyFromRecordset oRS
Wend
oRS.Close
oConn.Close
End Sub
```
| how to load a sectioned CSV file to an excel sheet? | CC BY-SA 2.5 | null | 2010-08-26T09:46:19.343 | 2010-08-27T16:04:14.467 | 2020-06-20T09:12:55.060 | -1 | 152,512 | [
"vba",
"csv",
"excel",
"excel-2010"
] |
3,573,942 | 1 | 5,573,618 | null | 4 | 8,731 | when state on a link the status bar shows the link's location in the status bar like in the following image...
is there a way to change\override this to show some desired text...

| HTML - overRide statusbar link location display | CC BY-SA 2.5 | null | 2010-08-26T09:50:57.683 | 2016-02-26T23:33:54.353 | null | null | 158,455 | [
"javascript",
"html",
"hyperlink",
"overriding",
"anchor"
] |
3,574,111 | 1 | 3,574,149 | null | 1 | 79 | i have 3 tables in my database and i created a entity model from database and it looks like this:

what im trying to do is to bind all 3 tables to datagridview and im using a query like this
```
var result = from t in db.Transactions
from c in db.Categories
from a in db.Accounts
where t.FkCategoryID == c.CategoryID && t.FkAccountID == a.AccountID
select new { t.Description, t.BankReference, t.TransactionDate, c.CategoryName, a.AccountName, a.AccountNr };
```
this works well.
But i need to be able to update the Transaction table by using the binding navigator toolbar

im not able to do that by using linq query and binding it to gridview.
Is there any way to accomplish that by using entity framework? I mean when i bind only one table to binding source im able to use that toolbar to delete update and add row but i have to show all tables and only be able to edit Transaction table
Thanks in advance
| ADO.NET Entity - Help needed | CC BY-SA 2.5 | null | 2010-08-26T10:13:41.847 | 2010-08-26T10:19:46.627 | null | null | 304,083 | [
"c#",
".net",
"ado.net-entity-data-model"
] |
3,574,618 | 1 | 3,574,654 | null | 0 | 795 | 
Hey all,
I am trying to accomplish something very simple yet getting an error and it's driving me nuts.
here is what I am doing:
Function 1:
```
-(id)initWithText:(NSString *)text1 :(NSString *)text2 :(NSString *)text3 :(NSString *)text4 :(NSString *)text5
{
```
here I do the assignment. I have not initialized the NSString date, projectName, task, duration and comment, but I don't see that causing any trouble.
```
date=text1;
projectName=text2;
task=text3;
duration=text4;
if ([text5 isEqualToString:@"Add Comment"]==TRUE || [text5 isEqualToString:@""]==TRUE)
{
comment=@"No Comment";
}
else {
comment=text5;
}
```
date, duration, task ,projectname, comment are all NSString type.
This function gets called in a different viewController using the statement:
Function1 Call:
```
[self.summaryViewController initWithText:self.dateDisplay.text :self.projectNameDisplay.text:self.taskDisplay.text:self.durationDisplay.text:commentText.text];
```
where dateDisplay, projectNameDisplay, taskDisplay, durationDisplay are all UILabels and commentText is a UITextView
---
now I try to save the values captured through the function into a database using another function.
Function2:
```
-(void) insertValues:(NSString *)text1 :(NSString *)text2 :(NSString *)text3 :(NSString *)text4 :(NSString *)text5
{
if([self openDB]==TRUE)
{
NSString *sql = [NSString stringWithFormat:@"INSERT INTO mastertable(_date,_projectName,_task,_duration,_comment,_status) VALUES ('%@','%@','%@','%@','%@','Pending');",text1, text2, text3, text4, text5];
char *err;
NSLog(sql);
if(sqlite3_exec(database,[sql UTF8String], NULL, NULL, &err) !=SQLITE_OK)
{
NSAssert(0, @"error inserting values into table");
sqlite3_close(database);
}
else
{
NSLog(@"Entry Made");
sqlite3_close(database);
}
}
}
```
Function2 call:
```
[master insertValues:date :projectName :task :duration :comment];
```
My insert into table query, when printed in NSLog, throws up this:
INSERT INTO mastertable(_date,_projectName,_task,_duration,_comment,_status) VALUES (' Aug 26, 2010',' Staffing',' Mentoring',' 01:01',
'( > )'
,'Pending');
I think it's because of the conversion of UITextView to NSString
Please help
Sayeed
| Capturing UITextView data in an NSString | CC BY-SA 2.5 | null | 2010-08-26T11:27:40.317 | 2010-09-02T12:09:44.753 | 2010-09-02T12:09:44.753 | null | null | [
"iphone"
] |
3,575,053 | 1 | 3,577,048 | null | 0 | 2,041 | The src property for the img tag is
```
http://maps.google.com/maps/api/staticmap?center=1701 Fm Rd 1187, Mansfield, Tx &size=150x90&sensor=false&zoom=15&maptype=roadmap" + "&markers=size:tiny|color:blue|1701 Fm Rd 1187, Mansfield, Tx
```

| Issue in displaying static Google maps | CC BY-SA 2.5 | null | 2010-08-26T12:32:49.160 | 2010-08-26T16:14:33.043 | 2010-08-26T16:14:33.043 | 222,908 | 461,582 | [
"asp.net",
"google-maps",
"google-maps-static-api"
] |
3,575,666 | 1 | 3,576,365 | null | 0 | 1,025 | look at this image

see the white are below the grey... find me a cure
```
<table border="0" cellpadding="0" cellspacing="0" height="30">
<tr>
<td>
<div class="mainmenu">
<ul>
<li class="li_nc"><a href="/" target="_self" >HOME</a></li>
<li class="li_hc"><a href="#" >PROGRAMS</a><ul class="ul_ch">
<li class="li_hc"><a href="#" >Engineering</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BEE ( Electronics 4 Years )</a></li>
<li class="li_nc"><a href="#" >BEE ( Tele Comm. 4 Years )</a></li>
<li class="li_nc"><a href="#" >BSE ( Software 4 Years )</a></li>
<li class="li_nc"><a href="#" >BCE (Computer 4 Years)</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Management Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BBA ( Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( 3 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( 2 1/2 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( 1 1/2 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( Weekend )</a></li>
<li class="li_nc"><a href="#" >MBA ( Pharma )</a></li>
<li class="li_nc"><a href="#" >Ph.D Management</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Earth & Environmental Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BS ( Geology\Geophysics )</a></li>
<li class="li_nc"><a href="#" >MS ( Geology\Geophysics )</a></li>
<li class="li_nc"><a href="#" >MS ( Environmental Policy & Management )</a></li>
<li class="li_nc"><a href="#" >MS & Ph.D ( Environmental )</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Professional Psychology</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BS ( 4 Years )</a></li>
<li class="li_nc"><a href="#" >PMD ( 1 Year )</a></li>
<li class="li_nc"><a href="#" >M. Phil ( 1-2 Years )</a></li>
<li class="li_nc"><a href="#" >Ph.D ( 2-3 Years )</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Marine & Maritime Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >MBA ( 1-5 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( Maritime 2-5 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( Maritime 3 Years )</a></li>
<li class="li_nc"><a href="#" >MSC ( Geophysics 2 Years )</a></li>
</ul></li>
<li class="li_nc"><a href="#" >Graduate & Applie Sciences</a></li>
<li class="li_hc"><a href="#" >Humanities & Social Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BSS ( 4 Years )</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Medical & Dental Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >MBBS ( 5 Years )</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Legal Studies</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >LLB ( 5 Years )</a></li>
</ul></li>
</ul></li>
<li class="li_hc"><a href="#" >ADMISSIONS</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >General Info</a></li>
<li class="li_nc"><a href="#" >Eligibility</a></li>
<li class="li_nc"><a href="#" >Admissions Procedure</a></li>
<li class="li_nc"><a href="#" >Freshmen Orientation</a></li>
<li class="li_nc"><a href="#" >How To Apply ?</a></li>
<li class="li_nc"><a href="#" >Prospectus</a></li>
</ul></li>
<li class="li_hc"><a href="#" >ACADEMICS</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >Semester System</a></li>
<li class="li_nc"><a href="#" >Examination System</a></li>
<li class="li_nc"><a href="#" >Course\Syllabus</a></li>
<li class="li_nc"><a href="#" >Faculty Evaluation</a></li>
<li class="li_nc"><a href="#" >Rules & Regulations</a></li>
<li class="li_nc"><a href="#" >Degree Recognition</a></li>
</ul></li>
<li class="li_hc"><a href="#" >FACILITIES</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >Student Support Facilities</a></li>
<li class="li_nc"><a href="#" >Laboratories</a></li>
<li class="li_nc"><a href="#" >Computer Laboratories</a></li>
<li class="li_nc"><a href="#" >Audio & Visual Facilities</a></li>
<li class="li_nc"><a href="#" >Medical Services</a></li>
<li class="li_nc"><a href="#" >Security Services</a></li>
<li class="li_nc"><a href="#" >Sports Facilities</a></li>
<li class="li_nc"><a href="#" >Study & Excursion Trips</a></li>
<li class="li_nc"><a href="#" >Cafeterias & Dinning</a></li>
</ul></li>
<li class="li_hc"><a href="#" >FACULTY</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >Islamabad Campus</a></li>
<li class="li_nc"><a href="#" >Karachi Campus</a></li>
</ul></li>
<li class="li_hc"><a href="#" >ABOUT</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >History</a></li>
<li class="li_nc"><a href="#" >Board Of Governers</a></li>
<li class="li_nc"><a href="#" >Constituent Units</a></li>
<li class="li_nc"><a href="#" >Affiliated Units</a></li>
</ul></li>
<li class="li_nc"><a href="#" >CONTACT US</a></li>
<li class="li_nc"><a href="#" >VIRTUAL TOUR</a></li>
</ul>
</div>
</td>
</tr>
</table>
```
Following is the CSS for this
```
/* pull-down mainmenu css */
.mainmenu{
float : left;
width : 100%;
height : 30;
padding: 0;
margin-bottom:0;
margin-top:0;
margin-left:0;
margin-right:0;
border-width:0;
}
.mainmenu ul {
float: left;
width: 100%;
list-style: none;
line-height: 1;
color:#e0e0e0;
background: #474747;
padding: 0;
border: solid transparent;
border-width: 1px 0;
margin: 0 0 1em 0;
}
.mainmenu a, .mainmenu a:visited
{
display: block;
font-family:calibri;
font-size:13px;
font-weight:normal;
font-style:normal;
text-decoration:underline;
color: #e0e0e0;
text-decoration: none;
padding: 1em 1em;
}
.mainmenu ul ul a{
width:100%;
height:100%;
}
.mainmenu ul a{
width:1%;
}
.mainmenu li {
float: left;
margin:0;
padding:0;
}
.mainmenu ul li
{
float:left; position:relative;
}
.mainmenu ul li a
{
white-space:nowrap;
}
.mainmenu li ul {
position: absolute;
left: -999em;
height: auto;
width:15em;
background: #474747;
font-weight: normal;
border-width: 1px;
margin: 0;
}
.mainmenu li li {
width:15em ;
}
.mainmenu li li a{
width:13em ;
}
.mainmenu li ul {
margin: 0;
}
.mainmenu li ul ul {
margin: -2.8em 0 0 13.5em;
}
.ul_ch,
.mainmenu li:hover ul ul,
.mainmenu li li:hover ul ul,
.mainmenu li li li:hover ul ul,
.mainmenu li li li li:hover ul ul,
.mainmenu li li li li li:hover ul ul
{
left: -999em;
}
.mainmenu li:hover ul,
.mainmenu li li:hover ul,
.mainmenu li li li:hover ul,
.mainmenu li li li li:hover ul,
.mainmenu li li li li li:hover ul
{
left: auto;
}
.mainmenu li:hover>ul.ul_ch
{
left: auto;
}
.mainmenu li:hover{
background: #0552a7;
}
.mainmenu li:hover a,.mainmenu li:hover a:visited,.mainmenu li:hover a:hover,.mainmenu li a:hover{
color:#e0e0e0;
}
.mainmenu li:hover li a, .mainmenu li li:hover li a,
.mainmenu li li li:hover li a, .mainmenu li li li li:hover li a,
.mainmenu li:hover li a:visited, .mainmenu li li:hover li a:visited,
.mainmenu li li li:hover li a:visited, .mainmenu li li li li:hover li a:visited
{
color:#e0e0e0;
}
.mainmenu li li:hover, .mainmenu li li li:hover,
.mainmenu li li li li:hover , .mainmenu li li li li li:hover , .mainmenu li li li li li li:hover
{
background: #0552a7;
z-index:9999;
}
.mainmenu li li:hover a,.mainmenu li li li:hover a,
.mainmenu li li li li:hover a, .mainmenu li li li li li:hover a
{
color: #e0e0e0;
}
.mainmenu ul ul a, .mainmenu ul ul a:visited,
.mainmenu li li a, .mainmenu li li a:visited
{
color: #e0e0e0;
}
.mainmenu ul ul a:hover,
.mainmenu li:hover li:hover a,.mainmenu li:hover li:hover a:visited ,
.mainmenu li:hover li:hover li:hover a,.mainmenu li:hover li:hover li:hover a:visited,
.mainmenu li:hover li:hover li:hover li:hover a,.mainmenu li:hover li:hover li:hover li:hover a:visited ,
.mainmenu li:hover li:hover li:hover li:hover li:hover a,.mainmenu li:hover li:hover li:hover li:hover li:hover a:visited,
.mainmenu li:hover li:hover li:hover li:hover li:hover li:hover a,.mainmenu li:hover li:hover li:hover li:hover li:hover li:hover a:visited{
color: #e0e0e0;
}
.mainmenu li:hover li:hover li a,.mainmenu li:hover li:hover li a:visited ,
.mainmenu li:hover li:hover li:hover li a,.mainmenu li:hover li:hover li:hover li a:visited,
.mainmenu li:hover li:hover li:hover li:hover li a,.mainmenu li:hover li:hover li:hover li:hover li a:visited,
.mainmenu li:hover li:hover li:hover li:hover li:hover li a,.mainmenu li:hover li:hover li:hover li:hover li:hover li a:visited{
color: #e0e0e0;
}
/* end of mainmenu css */
```
this is a CSS Menu which i generated from a tool called ... i have posted the complete CSS and HTML please solve
NOTE: the solution must not take away the formatting of the menu that you see in the image above
| HTML - Extra Space in table... debug | CC BY-SA 2.5 | null | 2010-08-26T13:44:30.690 | 2012-04-29T14:54:34.780 | 2020-06-20T09:12:55.060 | -1 | 158,455 | [
"html",
"css"
] |
3,575,968 | 1 | null | null | 7 | 3,147 | 
I have a given line R defined by an angle α. R goes through the origin of my plane. I also do have an rectangle, with known width and height. The rectangle has its bottom left corner on the origin.
A new line, parallel to R, is defined by a distance L from R (take A, B, and C as examples). I would like to find out the points where the new line intersects the rectangle (like P1 and P2 for the line A, P3 and P4 for B, and P5 and P6 for C).
What is the best way to find it?
| Points of intersection between line and rectangle | CC BY-SA 2.5 | null | 2010-08-26T14:13:31.027 | 2010-08-26T20:13:21.090 | 2010-08-26T16:43:57.067 | 31,615 | 61,207 | [
"math"
] |
3,576,163 | 1 | 3,584,723 | null | 0 | 425 | I want the logs from the Selenium Server Console write to file.
I know how to do this if i start server frome console (cmd.exe)
> java -jar selenium-server.jar -log logfile.txt
But i run selenium test in NetBeans and selenium server start from NetBeans.
I can to set port and way to start for the selenium server
screenshot url:
![alt text][1][http://www.screencast.com/users/Display_ACH/folders/Jing/media/f0982c5e-0c27-4dee-a684-0ed9c0c09a4e](http://www.screencast.com/users/Display_ACH/folders/Jing/media/f0982c5e-0c27-4dee-a684-0ed9c0c09a4e)
Can I to set option "log" for server which i run with NetBeans?
| Configuring server startup of SeleniumRC in NetBeans | CC BY-SA 2.5 | null | 2010-08-26T14:34:17.063 | 2010-08-27T13:42:03.777 | 2010-08-26T14:52:47.127 | 428,861 | 428,861 | [
"testing",
"netbeans",
"selenium",
"selenium-rc",
"netbeans-plugins"
] |
3,576,303 | 1 | 4,491,393 | null | 0 | 730 | Anybody have any idea why the error message repeats in Flex SDK 3.5 (but not in 3.4) and have a good way to make it stop repeating? See screenshots:


You can also see the different apps here:
[http://www.flexdevelopers.com/examples/validator/3.4/Tester.html](http://www.flexdevelopers.com/examples/validator/3.4/Tester.html)
[http://www.flexdevelopers.com/examples/validator/3.5/Tester.html](http://www.flexdevelopers.com/examples/validator/3.5/Tester.html)
[View source is enabled on both apps]
To make this happen, leave the textInput field empty and hit save multiple times. Then mouseover the textInput.
I can think of a couple of solutions but they seem pretty hacky.
Thanks,
[Jeremy Mitchell](http://blog.flexdevelopers.com/)
| Flex 3.5 Validator Error Message Repeats | CC BY-SA 2.5 | 0 | 2010-08-26T14:50:02.183 | 2010-12-20T16:05:23.320 | null | null | 213,298 | [
"apache-flex"
] |
3,576,550 | 1 | 3,577,474 | null | 2 | 2,353 | How can you make a sharpness filter with the library?


If it is not possible with , than what other languages are capable?
| PHP GD sharpness filter | CC BY-SA 2.5 | null | 2010-08-26T15:17:25.990 | 2010-12-14T12:24:31.920 | null | null | 1,246,275 | [
"php",
"image-processing",
"filter",
"gd"
] |
3,576,567 | 1 | 3,576,593 | null | 4 | 16,514 | I'm trying to position my picture a little bit lower so the center of the image aligns with the vertical center of the header tag.
Here is the both the HTML and the CSS. Thanks for the help!

```
#articlesummary
{
border: 2px solid red;
width: 750px;
}
#articlesummary h3
{
border: 2px solid red;
display:inline;
color: #4292C6;
font-family: Verdana;
}
#articlesummary img
{
width:30px;
border: 1px solid red;
margin-top: 5px;
}
.submissionowner
{
color: Gray;
}
<% foreach (var article in Model) { %>
<div id="articlesummary">
<h3><%: article.Title %></h3>
<sub class="submissionowner">Submmited by: <%: article.SiteUser.Login %></sub>
<img src="../../Content/anonymous.png" alt="Anonymous user." />
<p><%: article.Body %></p>
<sub>Views:<%: article.TotalViews %> | Rating: <%: article.TotalRating %></sub>
</div>
<% } %>
```
Thanks a bunch for any help!
| Trying to position my image a little bit lower, but it drags everything down with it | CC BY-SA 2.5 | 0 | 2010-08-26T15:19:32.850 | 2022-03-25T01:08:21.820 | null | null | null | [
"html",
"css",
"asp.net-mvc-2",
"image"
] |
3,576,673 | 1 | 3,576,834 | null | 1 | 301 | I have problem with the way I treat the memory management in iphone..please please help me..I am running out of ideas..I tried to play with the below method but it started leaks when I am trying to allocate the strings for the objects (for example allocation for sid,first_name etc)..I can't figure out how to do..and this is the method where I will get all the contacts from the service and insert it into the database..It consumes more memory which I figured out by running allocations instrument on iphone and my app on iphone crashes..please please help me guys..What is the better solution for it..I think my app consumes more memory but not sure where to look into it..I can post any code if this is not clear..thanks a lot!!!
```
- (void) get_entry_listHandler: (id) value{
NSString *salutation,*sugar_id,*first_name,*last_name,*title1,*department,*phone_home,*phone_mobile,*phone_work,*phone_other,*phone_fax,*assistant,*assistant_phone,*primary_address_street,*primary_address_city,*primary_address_state,*primary_address_postalcode,*custom;
NSString *primary_address_country,*alt_address_street,*alt_address_city,*alt_address_state,*alt_address_postalcode,*alt_address_country,*date_entered,*date_modified,*deleted,*do_not_call,*birthdate,*lead_source,*description,*email1,*email2,*account_name,*account_id,*id1;
// Handle errors
if([value isKindOfClass:[NSError class]]) {
NSLog(@"%@", value);
return;
}
// Handle faults
if([value isKindOfClass:[SoapFault class]]) {
NSLog(@"%@", value);
return;
}
// Do something with the SCRMget_entry_list_result* result
SCRMget_entry_list_result* result = (SCRMget_entry_list_result*)value;
//NSLog(@"get_entry_list returned the value: %@", result);
//NSLog(@"%@", result.entry_list);
NSLog(@"%@", result.error);
SCRMsugarsoap* service = [[SCRMsugarsoap alloc] initWithUrl:serverURL];
SCRMentry_value* entry;
for(NSString * myStr in result.entry_list) {
entry = (SCRMentry_value*)myStr;
//NSLog(@"1st %@",entry.name_value_list);
//NSLog(@"1st %@",entry.id);
//NSLog(@"1st %@",entry.module_name);
for(NSString * myStr1 in entry.name_value_list) {
SCRMname_value* value1 = (SCRMname_value*)myStr1;
if ([value1.name isEqualToString:@"id"])
sugar_id = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"salutation"])
salutation = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"first_name"])
first_name = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"last_name"])
last_name = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"title"])
title1 = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"department"])
department = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"phone_home"])
phone_home = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"phone_mobile"])
phone_mobile = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"phone_work"])
phone_work = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"phone_other"])
phone_other = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"phone_fax"])
phone_fax = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"assistant"])
assistant = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"assistant_phone"])
assistant_phone = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"primary_address_street"])
primary_address_street = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"primary_address_city"])
primary_address_city = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"primary_address_state"])
primary_address_state = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"primary_address_postalcode"])
primary_address_postalcode = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"primary_address_country"])
primary_address_country = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"alt_address_street"])
alt_address_street = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"alt_address_city"])
alt_address_city = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"alt_address_state"])
alt_address_state = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"alt_address_postalcode"])
alt_address_postalcode = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"alt_address_country"])
alt_address_country = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"date_entered"])
date_entered = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"date_modified"])
date_modified = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"deleted"])
deleted = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"do_not_call"])
do_not_call = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"birthdate"])
birthdate = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"lead_source"])
lead_source = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"description"])
description = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"email1"])
email1 = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"email2"])
email2 = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"account_name"])
account_name = [[NSString alloc] initWithFormat: @"%@",value1.value];
else if ([value1.name isEqualToString:@"account_id"])
account_id = [[NSString alloc] initWithFormat: @"%@",value1.value];
else
custom = [[NSString alloc] initWithFormat: @"%@",value1.value];
}
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setFormatterBehavior:NSDateFormatterBehavior10_4];
[df setDateFormat:@"yyy-MM-dd HH:mm:ss"];
NSDate *date_moded = [df dateFromString:date_modified];
NSDate *lastSync = [df dateFromString:lastSyncTime];
NSDate *date_enter = [df dateFromString:date_entered];
[df release];
if ([[date_moded laterDate:lastSync]isEqualToDate:date_moded] && lastSyncTime != nil && [date_enter isEqualToDate:date_moded])
id1 = [[NSString alloc]initWithFormat:@"%d",primaryKeyCount];
else if ([[date_moded laterDate:lastSync]isEqualToDate:date_moded] && lastSyncTime != nil )
id1 = [db getPrimaryKey:sugar_id];
else
id1 = [[NSString alloc]initWithFormat:@"%d",primaryKeyCount];
[db insertRecordIntoTableNamed: @"Contacts" withField1: @"id" field1Value: id1 andField2: @"sugar_id" field2Value: sugar_id
andField3: @"salutation" field3Value: salutation andField4: @"first_name" field4Value: first_name
andField5: @"last_name" field5Value: last_name andField6: @"title" field6Value: title1
andField7: @"department" field7Value: department andField8: @"phone_home" field8Value: phone_home
andField9: @"phone_mobile" field9Value: phone_mobile andField10: @"phone_work" field10Value: phone_work
andField11: @"phone_other" field11Value: phone_other andField12: @"phone_fax" field12Value: phone_fax
andField13: @"assistant" field13Value: assistant andField14: @"assistant_phone" field14Value: assistant_phone
andField15: @"primary_address_street" field15Value: primary_address_street andField16: @"primary_address_city" field16Value: primary_address_city
andField17: @"primary_address_state" field17Value: primary_address_state andField18: @"primary_address_postalcode" field18Value: primary_address_postalcode
andField19: @"primary_address_country" field19Value: primary_address_country andField20: @"alt_address_street" field20Value: alt_address_street
andField21: @"alt_address_city" field21Value: alt_address_city andField22: @"alt_address_state" field22Value: alt_address_state
andField23: @"alt_address_postalcode" field23Value: alt_address_postalcode andField24: @"alt_address_country" field24Value: alt_address_country
andField25: @"date_entered" field25Value: date_entered andField26: @"date_modified" field26Value: date_modified
andField27: @"deleted" field27Value: deleted andField28: @"do_not_call" field28Value: do_not_call
andField29: @"birthdate" field29Value: birthdate andField30: @"lead_source" field30Value: lead_source
andField31: @"description" field31Value: description andField32: @"email1" field32Value: email1
andField33: @"email2" field33Value: email2 andField34: @"account_name" field34Value: account_name
andField35: @"account_id" field35Value: account_id andField36: @"custom" field36Value: custom];
primaryKeyCount++;
currentCount++;
//NSLog(@"%D",i);
}
[salutation release];
[sugar_id release];
[first_name release];
[last_name release];
[title1 release];
[department release];
[phone_home release];
[phone_mobile release];
[phone_work release];
[phone_fax release];
[phone_other release];
[assistant release];
[assistant_phone release];
[primary_address_street release];
[primary_address_city release];
[primary_address_state release];
[primary_address_postalcode release];
[primary_address_country release];
[alt_address_street release];
[alt_address_city release];
[alt_address_state release];
[alt_address_postalcode release];
[alt_address_country release];
[custom release];
[date_entered release];
[deleted release];
[do_not_call release];
[birthdate release];
[lead_source release];
[description release];
[email1 release];
[email2 release];
[account_name release];
[account_id release];
float expected = (float) contactEntries;
float gotSoFar = (float) currentCount;
syncViewController.progressView.progress = ((float)((gotSoFar - 1) / (expected + 1)));
syncViewController.progressLabel.text=[NSString stringWithFormat:@"Syncing %d Contacts",contactEntries];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
integer = [NSNumber numberWithInt:primaryKeyCount];
[defaults setObject:integer forKey:@"primaryKeyCount"];
[defaults synchronize];
moduleViewController.db = db;
int a = result.next_offset;
int b = contactEntries;
while (result.result_count == 20 /*&& result.next_offset < contactEntries*/) {
if ( lastSyncTime == nil) {
[service get_entry_list:self action:@selector(get_entry_listHandler:) session:sessionId module_name: @"Contacts" query: @"" order_by: @"" offset: result.next_offset select_fields: [[[SCRMselect_fields alloc] init]autorelease] max_results: contactEntries deleted: 0];
[service release];
return;
//break;
}
else {
[service get_entry_list:self action:@selector(get_entry_listHandler:) session:sessionId module_name: @"Contacts" query: finalQuery order_by: @"" offset: result.next_offset select_fields: [[[SCRMselect_fields alloc] init]autorelease] max_results: contactEntries deleted: 0];
[service release];
return;
//break;
}
}
if (a >= b ) {
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
[settingsViewController.navigationController pushViewController:moduleViewController animated:YES];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setBool:NO forKey:@"reset"];
[defaults synchronize];
[finalQuery release];
}
/*else if (a >= b && syncing == YES) {
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
[moduleViewController reload];
}*/
[service release];
[id1 release];
}
```
I got rid of all the leaks but can any one please tell me how to check the object allocations instrument in iphone..Please see the below screenshot..My app gets crashed once it loads all the 4200 contacts and the contacts are never displayed on the table view..What might be the problem..I make sure that the place from which my contacts is saved to the database is leak free..In the below screenshot what exactly should I look for..is it the total allocation or living..please let me know guys..I am totally exhausted..thanks a lot for your time..

| Object allocations instrument on iphone | CC BY-SA 2.5 | null | 2010-08-26T15:30:44.630 | 2010-08-27T07:18:42.880 | 2010-08-26T18:56:03.497 | 420,556 | 420,556 | [
"iphone",
"objective-c",
"memory-management",
"soap",
"memory-leaks"
] |
3,577,052 | 1 | 3,577,093 | null | 0 | 250 | Alright I'm a bit baffled by this one. Changing an unrelated int property on my ViewModel seems to be making my Model unserializable.
I have an object which tracks the best time to contact someone. It can be set to Anyday, Weekdays, Evenings, SpecificDays and to Anytime, Mornings, Afternoons, Evenings, and SpecificTimes. When the object is saved, it gets serialized and sent to a WCF server.
In essence, the object is a collection of 7 Days. Each Day contains an int for the day of week, a collection of TimeSpans which define good calling hours for that day, an a collection of boolean flags which define which "shortcut" groups of times were selected (Morning, Afternoon, Evening, etc).
I am using MVVM and have a VM to handle this class. The only property the VM contains other then the collection of days is an int value of which "shortcut" group for the weekdays are defined (Weekdays, Weekends etc).
Everything works absolutely fine until I set the "shortcut" group for Weekdays to "SpecificDays". Upon saving, I get an error trying to pass the object to the WCF server. The error says it cannot serialize a parameter with the inner exception shown below (keep in mind that WCF errors are very generic and often do not point to the problem at all). Here's a screenshot of what I'm trying to do:

This doesn't make sense to me, because the ShortcutWeekday is not sent to the WCF server at all. The only thing that goes is the collection of Days. And another puzzling thing, clicking on the "Specific Days" radio button, then clicking back to another selection will make the WCF call fail as well. Also, if the problem was with my class itself, wouldn't it have failed saving anytime, not just for the Specific Days?? I double-checked the property values of the collection of Days using the example above, and the object properties are set exactly the same.
Inner Exception:
```
"Type 'System.DelegateSerializationHolder+DelegateEntry' with data contract name
'DelegateSerializationHolder.DelegateEntry:http://schemas.datacontract.org/2004/07/System'
is not expected. Consider using a DataContractResolver or add any types not known
statically to the list of known types - for example, by using the KnownTypeAttribute
attribute or by adding them to the list of known types passed to DataContractSerializer."
```
ViewModel properties:
```
// Used to track which Radio Button is selected
private int _selectedWeekdayGroup = 0;
// Object holding the current BestContactTime
private BestContactTime _bestContactTime;
// Shortcut to multiple Days in BestContactTime
public int SelectedWeekdayGroup
{
get { return _selectedWeekdayGroup; }
set
{
//UpdateCallableDays(value); // This updates the BestContactTime.Days collection
_selectedWeekdayGroup = value;
//OnPropertyChanged("SelectedTimesGroups"); // This property is just which set of ShortcutTimes are displayed in checkboxes
}
}
```
BestContactTime:
```
// Should always have only 7 objects, one per day of week
public ObservableCollection<ContactDay> Days;
```
Contact Day:
```
public int WeekDay;
public SortableObservableCollection<TimeSpan> CallableTimes;
public SortableObservableCollection<bool> CallableTimeGroups;
```
SortableObservableCollection is just a class which inherits from ObservableCollection with some additional methods such as Sorting and AddRange.
| Changing a property in ViewModel making Model unserializable? | CC BY-SA 2.5 | null | 2010-08-26T16:10:07.093 | 2011-09-28T00:21:49.627 | null | null | 302,677 | [
"wpf",
"mvvm",
"serialization"
] |
3,577,454 | 1 | 3,835,552 | null | 4 | 192 | Has anybody been in or has seen a kind of "Surgical Team" as described in The Mythical Man Month? Have you heard of somebody actually implementing "Mill's Proposal"?
There is a lot of detail about the various roles in the book itself, but for those who haven't read the book, I found a [website](http://www.dfpug.de/loseblattsammlung/online/workshop/design_patterns/sonstiges.htm) and a [blog post](http://runtimelog.blogspot.com/2005/06/mythical-surgical-team_10.html) which give a good summary. I've quoted the roles from the website below:
> - The is the chief programmer and the el-presidente of the whole
team. He produces all the
specifications, codes the entire
system the team is responsible for,
tests it, and drafts its supporting
documentation.- The is the surgeon’s assistant. His main purpose is to
share in the thinking about design
issues – to serve as a sounding board,
as it were. The copilot represents the
team in meetings with other teams. He
knows the code intimately, and serves
as insurance in case of disaster to
the surgeon.- The supports the surgeon and builds specialized utilities and
tools as may be required by his
surgeon. Each team has its dedicated
toolsmith in addition to any central
services provided by the rest of the
project infrastructure. The tester is
responsible for maintaining test cases
for testing the surgeon’s work as he
writes it. He is both an adversary who
devises test cases to measure against
the formal specs and devises test data
to be used in debugging.- The , which can serve several surgeons, I a widely consulted
specialist who delights in the mastery
of the intricacies of the programming
languages and the operating systems
upon which the software must perform. - The handles money, people, space, and machines. The
surgeon is the ultimate boss, with the
last word on all these issues, but the
day to day management of the issues
and interfacing with the
administrative machinery of the
project is the role of a professional
administrator. One administrator may
serve more than one team.- The edits and revises the documentation as drafted or dictated
by the surgeon and oversees the
mechanics of its production.- The , trained as a secretary, is responsible for
maintaining all the machine-readable
and human-readable technical records
generated by the team. All the filing
and indexing is the responsibility of
the program clerk.- The handle the project correspondence and non-project files.
| Do Surgical Teams exist? | CC BY-SA 2.5 | 0 | 2010-08-26T16:54:19.847 | 2017-08-09T12:18:57.510 | 2017-08-09T12:18:57.510 | 1,000,551 | 84,556 | [
"methodology"
] |
3,578,031 | 1 | 3,578,096 | null | 0 | 121 | is there any way to program this option in xcode ? i don't think so this is text Alignment , it's something like text direction on microsoft office !

| How implement this option ? {iPhone SDK} | CC BY-SA 2.5 | null | 2010-08-26T18:02:00.870 | 2010-08-26T18:09:57.637 | null | null | 199,173 | [
"iphone"
] |
3,578,530 | 1 | null | null | 0 | 1,738 | I am trying to add a Ribbon Button directly to the Quick Access Toolbar by using the CanAddToQuickAccessToolBarDirectly property. I have read in order to do this a command must be enabled on the button from this source ([http://blogs.msdn.com/b/llobo/archive/2010/08/06/wpf-ribbon-basics.aspx#comments](http://blogs.msdn.com/b/llobo/archive/2010/08/06/wpf-ribbon-basics.aspx#comments)). When I add a command to the button it becomes disabled (grayed out).
Below is the XAML code snippet associated with the button, a visual representation of the issue and the associated CommandBindings for the RibbonBar:

(link: [http://i.stack.imgur.com/mV53U.png](https://i.stack.imgur.com/mV53U.png))
Any assistance with this issue would be greatly appreciated. This RibbonControlsLibrary.DLL is fairly new (released Aug. 2).
| Issue adding ribbon buttons directly to quick access toolbar | CC BY-SA 2.5 | null | 2010-08-26T18:59:54.993 | 2011-08-03T13:25:55.667 | 2010-08-26T20:16:22.247 | 7,872 | 432,239 | [
"c#",
"wpf",
"ribbon",
"command",
"commandbinding"
] |
3,579,673 | 1 | 3,579,713 | null | 1 | 437 | Here is part of my Entity Model which I just generated from a MySql database. My question is why are the tables UserNotes and UserLoginHistory coming out as Zero to One. When I change them to many (collection of usernotes) I get the error:
> Error 1 Error 113: Multiplicity is not valid in Role 'user_notes' in relationship 'UserIdFKeyNotes'. Because the Dependent Role refers to the key properties, the upper bound of the multiplicity of the Dependent Role must be 1. C:\PerforceWorkspace\Web Services\UserDatabaseManipulation\Entity\ServicesModel.edmx 154 11 UserDatabaseManipulation
In terms of foreign keys the user id in all tables references the userid in the user table.

| Entity Model Zero To One Should be One to Many? | CC BY-SA 2.5 | null | 2010-08-26T21:28:26.090 | 2010-08-26T21:32:50.073 | 2010-08-26T21:30:22.280 | 135,152 | 423,079 | [
"c#",
"mysql",
"entity-framework"
] |
3,579,806 | 1 | 3,579,834 | null | 6 | 2,627 | I have two tables, Locations and Facilities
They map to two classes,
```
public Location : Entity
{
//properties
}
public Facility : Entity
{
public virtual Location Location { get; set; }
}
```
Everything works just dandy, until I change facility to this
```
public Facility : Location
{
}
```
Now I get an exception from nHibernate saying
```
NHibernate.ADOException was unhandled by user code
Message=could not execute query
InnerException: System.Data.SqlClient.SqlException
Message=Invalid object name 'Facility'.
```
For some reason it is not creating the plural name of the table into the sql string.
Thanks for any help!
EDIT
This is my current TableNameConvention
```
public class TableNameConvention : IClassConvention
{
public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
{
instance.Table(Inflector.Net.Inflector.Pluralize(instance.EntityType.Name));
}
}
```
When Facility inherits from Entity, the Facility does run through this method. When it inherits from Location, it does not
Edit 2
Figured I'd post everything...

```
public class AutoPersistenceModelGenerator : IAutoPersistenceModelGenerator
{
#region IAutoPersistenceModelGenerator Members
public AutoPersistenceModel Generate()
{
var mappings = new AutoPersistenceModel();
mappings.AddEntityAssembly(typeof(Person).Assembly).Where(GetAutoMappingFilter);
mappings.Conventions.Setup(GetConventions());
mappings.Setup(GetSetup());
mappings.IgnoreBase<Entity>();
mappings.IgnoreBase(typeof(EntityWithTypedId<>));
mappings.UseOverridesFromAssemblyOf<AutoPersistenceModelGenerator>();
return mappings;
}
#endregion
private Action<AutoMappingExpressions> GetSetup()
{
return c =>
{
c.FindIdentity = type => type.Name == "Id";
};
}
private Action<IConventionFinder> GetConventions()
{
return c =>
{
c.Add<BHP.DEC.Data.NHibernateMaps.Conventions.ForeignKeyConvention>();
c.Add<BHP.DEC.Data.NHibernateMaps.Conventions.HasManyConvention>();
c.Add<BHP.DEC.Data.NHibernateMaps.Conventions.HasManyToManyConvention>();
c.Add<BHP.DEC.Data.NHibernateMaps.Conventions.ManyToManyTableNameConvention>();
c.Add<BHP.DEC.Data.NHibernateMaps.Conventions.PrimaryKeyConvention>();
c.Add<BHP.DEC.Data.NHibernateMaps.Conventions.ReferenceConvention>();
c.Add<BHP.DEC.Data.NHibernateMaps.Conventions.TableNameConvention>();
};
}
/// <summary>
/// Provides a filter for only including types which inherit from the IEntityWithTypedId interface.
/// </summary>
private bool GetAutoMappingFilter(Type t)
{
return t.GetInterfaces().Any(x =>
x.IsGenericType &&
x.GetGenericTypeDefinition() == typeof(IEntityWithTypedId<>));
}
}
```
| Fluent nHibernate Automapping not creating Plural table name | CC BY-SA 2.5 | 0 | 2010-08-26T21:48:59.723 | 2013-05-28T17:07:51.667 | 2010-08-26T22:29:33.463 | 128,968 | 128,968 | [
"fluent-nhibernate",
"automapping"
] |
3,580,023 | 1 | 3,580,050 | null | 4 | 1,889 | This is probably best explained with a visual.
As shown below, I have two `<input>` elements for the user to enter dates.

Is there a CSS or HTML attribute that will allow me to center the contents (in my case, the dates) horizontally in the displayed input areas instead of left-aligning them?
Note: I am not trying to align the controls themselves, just what is inside them.
| Is there a css or html attribute to center the contents of an input tag? | CC BY-SA 2.5 | 0 | 2010-08-26T22:22:36.473 | 2010-10-29T21:59:42.363 | null | null | 30,018 | [
"html",
"css",
"alignment"
] |
3,580,051 | 1 | 3,585,062 | null | 19 | 12,688 | As per the [original question](https://stackoverflow.com/questions/3567312/android-drop-shadow-on-view/3568992#3568992), The end result is a rounded-rect `png` in an `ImageView` with a natural looking drop shadow.
I have the shadow working, but when it draws, it makes the entire image black.

How can I prevent the original image (definitely not black) from being black when adding the shadow?
```
BlurMaskFilter blurFilter = new BlurMaskFilter(2, BlurMaskFilter.Blur.OUTER);
Paint shadowPaint = new Paint();
shadowPaint.setMaskFilter(blurFilter);
int[] offsetXY = new int[2];
Bitmap originalBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.pier_t);
Bitmap shadowImage = originalBitmap.extractAlpha(shadowPaint, offsetXY);
Canvas c = new Canvas(shadowImage);
c.drawBitmap(originalBitmap, -offsetXY[0], -offsetXY[1], null);
imageView.setImageBitmap(shadowImage);
```
I implemented Josh's suggestion about copying over to the correct color space and now it works great! For future searchers, . You can play around with the x and y, as well as the OUTER constant to get the desired effect.
```
BlurMaskFilter blurFilter = new BlurMaskFilter(2, BlurMaskFilter.Blur.OUTER);
Paint shadowPaint = new Paint();
shadowPaint.setMaskFilter(blurFilter);
int[] offsetXY = new int[2];
Bitmap originalBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.pier_t);
Bitmap shadowImage = originalBitmap.extractAlpha(shadowPaint, offsetXY);
Bitmap shadowImage32 = shadowImage.copy(Bitmap.Config.ARGB_8888, true);
Canvas c = new Canvas(shadowImage32);
c.drawBitmap(originalBitmap, -offsetXY[0], -offsetXY[1], null);
imageView.setImageBitmap(shadowImage32);
```

| How to prevent Android's drawBitmap from only drawing black images? | CC BY-SA 2.5 | 0 | 2010-08-26T22:26:31.780 | 2010-08-27T17:24:31.090 | 2017-05-23T12:13:30.460 | -1 | 69,634 | [
"android",
"paint",
"blur",
"shadow",
"drawbitmap"
] |
3,580,159 | 1 | 3,582,795 | null | 0 | 779 | I've created a form with code and I have a big problem. Every element aligmented to the bottom. I painted the clear and aligned space blue on the picture. How can I set every alignment to top?
If you need the code in this question you'll find it: [Qt heap memory corruption](https://stackoverflow.com/questions/3574147/qt-heap-memory-corruption)

| QT widget alignment problem | CC BY-SA 2.5 | null | 2010-08-26T22:47:10.840 | 2010-08-27T09:22:30.700 | 2017-05-23T12:07:06.850 | -1 | 305,604 | [
"qt",
"qt4"
] |
3,580,178 | 1 | null | null | 0 | 2,289 | I need to incorporate file uploads into my website, and after a few hours of thinking I came up with a pretty good way I think.
The page with the upload form will be served by a front end web server. To make sure it uploads the file to my remote storage server I'll do this in the markup:
```
<form action="http://storage.mysite.com/upload.php">
<!-- whatever -->
</form>
```
So that's that handled, but that makes things like a tad more complicated. I also wanted a progress bar for the upload, and I think I came up with a way to do that too. Check out my awesome Photoshop skills explaining it:

To get the progress of the uploaded file, I was going to use the PHP function `filesize();` to get the filesize of the file as it's being uploaded. If I have that and the total filezsize I can work it out using Javascript and update the page. But I don't know how to get the total filesize of the upload either :P
Then when the upload is finished I can check the filesize again and if it's the same as the total filesize I know the upload is finished. Then I can run a Javascript function to update the page with the download URL and everything else.
Anyway that's how I'm planning to do it. I don't want to use any fancy flash stuff as I don't want to rely on my users having flash installed. Does anyone who has done something simular or have experience in doing this lend some advice and let me know if I'm going about it the right way?
Thanks, much appreciated.
| File upload to remote server with progress bar | CC BY-SA 3.0 | null | 2010-08-26T22:52:08.803 | 2011-12-04T12:15:00.057 | 2011-12-04T12:15:00.057 | 84,042 | 415,617 | [
"jquery",
"file-upload"
] |
3,580,500 | 1 | 3,583,903 | null | 8 | 5,288 | I have two images:


I'd like to essentially 'cut out' the black shape from the texture tile so that I end up with something along these lines:

Except transparent around the shape. Is this possible using pygame? This example I had to create in GIMP.
Additionally, would it be too performance-heavy to do this for every frame for a few sprites in a real-time environment? (30+ frames per second)
| Active texturing with pygame (possible? what concepts to look into?) | CC BY-SA 2.5 | 0 | 2010-08-27T00:16:03.423 | 2010-09-16T09:07:07.227 | null | null | 60,739 | [
"python",
"pygame"
] |
3,580,706 | 1 | null | null | 4 | 1,872 | In my current project I need to be able to have both editable and read-only versions of classes. So that when the classes are displayed in a List or PropertGrid the user is not able to edit objects they should not be allowed to.
To do this I'm following the design pattern shown in the diagram below. I start with a read-only interface (`IWidget`), and then create an edtiable class which implements this interface (`Widget`). Next I create a read-only class (`ReadOnlyWidget`) which simply wraps the mutable class and also implements the read only interface.
I'm following this pattern for a number of different unrelated types. But now I want to add a search function to my program, which can generate results that include any variety of types including both mutable and immutable versions. So now I want to add another set of interfaces (`IItem`, `IMutableItem`) that define properties which apply to all types. So `IItem` defines a set of generic immutable properties, and `IMutableItem` defines the same properties but editable. In the end a search will return a collection of `IItems`, which can then later be cast to more specific types if needed.
Yet, I'm not sure if I'm setting up the relationships to `IMutable` and `IItem` correctly. Right now I have each of the interfaces (`IWidget`, `IDooHickey`) inheriting from `IItem`, and then the mutable classes (`Widget`, `DooHickey`) in addition also implement `IMutableItem`.
Alternatively, I was also thinking I could then set `IMutableItem` to inherit from `IItem`, which would hide its read-only properties with new properties that have both get and set accessors. Then the mutable classes would implement `IMutableItem`, and the read-only classes would implement `IItem`.
I'd appreciate any suggestions or criticisms regarding any of this.

```
public interface IItem
{
string ItemName { get; }
}
public interface IMutableItem
{
string ItemName { get; set; }
}
public interface IWidget:IItem
{
void Wiggle();
}
public abstract class Widget : IWidget, IMutableItem
{
public string ItemName
{
get;
set;
}
public void Wiggle()
{
//wiggle a little
}
}
public class ReadOnlyWidget : IWidget
{
private Widget _widget;
public ReadOnlyWidget(Widget widget)
{
this._widget = widget;
}
public void Wiggle()
{
_widget.Wiggle();
}
public string ItemName
{
get {return _widget.ItemName; }
}
}
public interface IDoohickey:IItem
{
void DoSomthing();
}
public abstract class Doohickey : IDoohickey, IMutableItem
{
public void DoSomthing()
{
//work it, work it
}
public string ItemName
{
get;
set;
}
}
public class ReadOnlyDoohickey : IDoohickey
{
private Doohickey _doohicky;
public ReadOnlyDoohickey(Doohickey doohicky)
{
this._doohicky = doohicky;
}
public string ItemName
{
get { return _doohicky.ItemName; }
}
public void DoSomthing()
{
this._doohicky.DoSomthing();
}
}
```
| Creating read-only versions of classes in a complex object structure | CC BY-SA 2.5 | 0 | 2010-08-27T01:22:51.020 | 2013-02-13T21:50:23.650 | null | null | 88,427 | [
"c#",
".net",
"interface",
"class-design",
"readonly"
] |
3,580,822 | 1 | 3,582,214 | null | 1 | 1,114 | Hey. Nooby question but new with Entity.
I am trying to create a new user object and some details in some additional tables which have a foreign key of the newly created user id.
I've attempted to do this in one round trip. Do I have to add the user to the database first and then go back, set the userid's on the other objects and add them. Here is the Entity Model and code to elaborate:

```
using (var context = new ServicesEntities())
{
newUser = new UsersTable();
newUser.Address = user.UserDetails.Address;
newUser.City = user.UserDetails.City;
newUser.Country = user.UserDetails.Country;
newUser.Email = user.Email.EmailString;
newUser.FirstName = user.UserDetails.FirstName;
newUser.LastName = user.UserDetails.LastName;
newUser.State = user.UserDetails.State;
newUser.Zip = user.UserDetails.Zip;
context.UsersTables.AddObject(newUser);
context.SaveChanges();
}
using (var context = new ServicesEntities())
{
var referralDetails = new UserReferrals();
referralDetails.CreatedThruServiceId = 1; // todo don't make this an absolute 1
referralDetails.ReferralEmail = user.ReferralDetails.ReferralEmail;
referralDetails.TwoPlusTwoHandle = user.ReferralDetails.TwoPlusTwoHandle;
referralDetails.UserId = newUser.UserId;
context.UserReferrals.AddObject(referralDetails);
context.SaveChanges(); // THIS WORKS FINE!
}
using (var context = new ServicesEntities())
{
var credentials = new UserCredentials();
credentials.CreatedOn = DateTime.Now;
credentials.EmailValidated = false;
//credentials.EmailValidatedOn = null;
credentials.FailedLoginAttempts = 0;
credentials.IsLockedOut = false;
//credentials.LastValidLogin = null;
credentials.Password = user.Password.PasswordString;
credentials.PermissionId = 1; // todo don't make this an absolute 1 = user
credentials.SuccessfulLoginAttempts = 0;
credentials.UserId = newUser.UserId; ;
context.UserCredentials.AddObject(credentials);
context.SaveChanges(); // THIS ONE CRAPS OUT!
}
```
When I run this I get the following Exception when I run SaveChanges():
> {"A dependent property in a
ReferentialConstraint is mapped to a
store-generated column. Column:
'UserId'."}
```
public POCO.User AddNewUserToDb(User user)
{
if (IsDuplicateUser(user.Email.EmailString))
{
throw new DuplicateNameException("This email is already taken.");
}
UsersTable newUser;
using (var context = new ServicesEntities())
{
newUser = new UsersTable();
newUser.Address = user.UserDetails.Address;
newUser.City = user.UserDetails.City;
newUser.Country = user.UserDetails.Country;
newUser.Email = user.Email.EmailString;
newUser.FirstName = user.UserDetails.FirstName;
newUser.LastName = user.UserDetails.LastName;
newUser.State = user.UserDetails.State;
newUser.Zip = user.UserDetails.Zip;
var referralDetails = new UserReferrals();
referralDetails.CreatedThruServiceId = 1; // todo don't make this an absolute 1
referralDetails.ReferralEmail = user.ReferralDetails.ReferralEmail;
referralDetails.TwoPlusTwoHandle = user.ReferralDetails.TwoPlusTwoHandle;
//referralDetails.UserId = newUser.UserId;
var credentials = new UserCredentials();
credentials.CreatedOn = DateTime.Now;
credentials.EmailValidated = false;
//credentials.EmailValidatedOn = null;
credentials.FailedLoginAttempts = 0;
credentials.IsLockedOut = false;
//credentials.LastValidLogin = null;
credentials.Password = user.Password.PasswordString;
credentials.PermissionId = 1; // todo don't make this an absolute 1 = user
credentials.SuccessfulLoginAttempts = 0;
//credentials.UserId = newUser.UserId; ;
newUser.Credentials = credentials;
newUser.ReferralDetails = referralDetails;
context.UsersTables.AddObject(newUser);
context.SaveChanges();
}
user.UserId = newUser.UserId;
return user;
```
| Entity DB Adding New User and Other Related Data to DB | CC BY-SA 2.5 | null | 2010-08-27T01:57:22.180 | 2010-08-27T15:52:49.197 | 2010-08-27T15:52:49.197 | 423,079 | 423,079 | [
"c#",
"entity-framework"
] |
3,581,108 | 1 | 3,582,924 | null | 0 | 217 | So I'm writing up a CV and I would like to use the nifty `itemize` environment to list some things within a `tabular` environment. Unfortunately, things end up looking a bit
, which isn't at all what I want. Specifically, I want to the itemize environment to hug closely to "BIG COMPANY NAME" so that it appears as "Software Development Intern" does, and likewise at the bottom. My current code looks a bit like so:
```
\textsc{May 2010 to Aug 2010}
& Software Development Intern \\
& \textsc{BIG COMPANY NAME} \\
& \begin{itemize}
\setlength{\itemsep}{0pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
\setlength{\partopsep}{0pt}
\setlength{\topsep}{0pt}
\item item1
\item item2
\end{itemize} \\
& \small{Cool Details}\\
```
Buuut it's not doing the job at all. Any suggestions, Latex gurus?
| Lists in Tabular Environment | CC BY-SA 2.5 | null | 2010-08-27T03:19:04.893 | 2010-08-27T09:37:20.480 | null | null | 128,580 | [
"latex",
"pdflatex"
] |
3,581,668 | 1 | 3,581,700 | null | 0 | 555 | i have this code for a CSS Menu... i got it generated by using a CSS Menu Generator tool ... its not working with IE6... what to do...

HTML is here
```
<table border="0" cellpadding="0" cellspacing="0" height="30">
<tr>
<td>
<div class="mainmenu">
<ul>
<li class="li_nc"><a href="/" target="_self" >HOME</a></li>
<li class="li_hc"><a href="#" >PROGRAMS</a><ul class="ul_ch">
<li class="li_hc"><a href="#" >Engineering</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BEE ( Electronics 4 Years )</a></li>
<li class="li_nc"><a href="#" >BEE ( Tele Comm. 4 Years )</a></li>
<li class="li_nc"><a href="#" >BSE ( Software 4 Years )</a></li>
<li class="li_nc"><a href="#" >BCE (Computer 4 Years)</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Management Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BBA ( Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( 3 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( 2 1/2 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( 1 1/2 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( Weekend )</a></li>
<li class="li_nc"><a href="#" >MBA ( Pharma )</a></li>
<li class="li_nc"><a href="#" >Ph.D Management</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Earth & Environmental Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BS ( Geology\Geophysics )</a></li>
<li class="li_nc"><a href="#" >MS ( Geology\Geophysics )</a></li>
<li class="li_nc"><a href="#" >MS ( Environmental Policy & Management )</a></li>
<li class="li_nc"><a href="#" >MS & Ph.D ( Environmental )</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Professional Psychology</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BS ( 4 Years )</a></li>
<li class="li_nc"><a href="#" >PMD ( 1 Year )</a></li>
<li class="li_nc"><a href="#" >M. Phil ( 1-2 Years )</a></li>
<li class="li_nc"><a href="#" >Ph.D ( 2-3 Years )</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Marine & Maritime Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >MBA ( 1-5 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( Maritime 2-5 Years )</a></li>
<li class="li_nc"><a href="#" >MBA ( Maritime 3 Years )</a></li>
<li class="li_nc"><a href="#" >MSC ( Geophysics 2 Years )</a></li>
</ul></li>
<li class="li_nc"><a href="#" >Graduate & Applie Sciences</a></li>
<li class="li_hc"><a href="#" >Humanities & Social Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >BSS ( 4 Years )</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Medical & Dental Sciences</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >MBBS ( 5 Years )</a></li>
</ul></li>
<li class="li_hc"><a href="#" >Legal Studies</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >LLB ( 5 Years )</a></li>
</ul></li>
</ul></li>
<li class="li_hc"><a href="#" >ADMISSIONS</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >General Info</a></li>
<li class="li_nc"><a href="#" >Eligibility</a></li>
<li class="li_nc"><a href="#" >Admissions Procedure</a></li>
<li class="li_nc"><a href="#" >Freshmen Orientation</a></li>
<li class="li_nc"><a href="#" >How To Apply ?</a></li>
<li class="li_nc"><a href="#" >Prospectus</a></li>
</ul></li>
<li class="li_hc"><a href="#" >ACADEMICS</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >Semester System</a></li>
<li class="li_nc"><a href="#" >Examination System</a></li>
<li class="li_nc"><a href="#" >Course\Syllabus</a></li>
<li class="li_nc"><a href="#" >Faculty Evaluation</a></li>
<li class="li_nc"><a href="#" >Rules & Regulations</a></li>
<li class="li_nc"><a href="#" >Degree Recognition</a></li>
</ul></li>
<li class="li_hc"><a href="#" >FACILITIES</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >Student Support Facilities</a></li>
<li class="li_nc"><a href="#" >Laboratories</a></li>
<li class="li_nc"><a href="#" >Computer Laboratories</a></li>
<li class="li_nc"><a href="#" >Audio & Visual Facilities</a></li>
<li class="li_nc"><a href="#" >Medical Services</a></li>
<li class="li_nc"><a href="#" >Security Services</a></li>
<li class="li_nc"><a href="#" >Sports Facilities</a></li>
<li class="li_nc"><a href="#" >Study & Excursion Trips</a></li>
<li class="li_nc"><a href="#" >Cafeterias & Dinning</a></li>
</ul></li>
<li class="li_hc"><a href="#" >FACULTY</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >Islamabad Campus</a></li>
<li class="li_nc"><a href="#" >Karachi Campus</a></li>
</ul></li>
<li class="li_hc"><a href="#" >ABOUT</a><ul class="ul_ch">
<li class="li_nc"><a href="#" >History</a></li>
<li class="li_nc"><a href="#" >Board Of Governers</a></li>
<li class="li_nc"><a href="#" >Constituent Units</a></li>
<li class="li_nc"><a href="#" >Affiliated Units</a></li>
</ul></li>
<li class="li_nc"><a href="#" >CONTACT US</a></li>
<li class="li_nc"><a href="#" >VIRTUAL TOUR</a></li>
</ul>
</div>
</td>
</tr>
</table>
```
here is the CSS
```
/* pull-down mainmenu css */
.mainmenu{
float : left;
width : 100%;
height : 30;
padding: 0;
margin-bottom:0;
margin-top:0;
margin-left:0;
margin-right:0;
border-width:0;
}
.mainmenu ul {
float: left;
width: 100%;
list-style: none;
line-height: 1;
color:#e0e0e0;
background: #474747;
padding: 0;
border: solid transparent;
border-width: 1px 0;
margin: 0 0 1em 0;
}
.mainmenu a, .mainmenu a:visited
{
display: block;
font-family:calibri;
font-size:13px;
font-weight:normal;
font-style:normal;
text-decoration:underline;
color: #e0e0e0;
text-decoration: none;
padding: 1em 1em;
}
.mainmenu ul ul a{
width:100%;
height:100%;
}
.mainmenu ul a{
width:1%;
}
.mainmenu li {
float: left;
margin:0;
padding:0;
}
.mainmenu ul li
{
float:left; position:relative;
}
.mainmenu ul li a
{
white-space:nowrap;
}
.mainmenu li ul {
position: absolute;
left: -999em;
height: auto;
width:15em;
background: #474747;
font-weight: normal;
border-width: 1px;
margin: 0;
}
.mainmenu li li {
width:15em ;
}
.mainmenu li li a{
width:13em ;
}
.mainmenu li ul {
margin: 0;
}
.mainmenu li ul ul {
margin: -2.8em 0 0 13.5em;
}
.ul_ch,
.mainmenu li:hover ul ul,
.mainmenu li li:hover ul ul,
.mainmenu li li li:hover ul ul,
.mainmenu li li li li:hover ul ul,
.mainmenu li li li li li:hover ul ul
{
left: -999em;
}
.mainmenu li:hover ul,
.mainmenu li li:hover ul,
.mainmenu li li li:hover ul,
.mainmenu li li li li:hover ul,
.mainmenu li li li li li:hover ul
{
left: auto;
}
.mainmenu li:hover>ul.ul_ch
{
left: auto;
}
.mainmenu li:hover{
background: #0552a7;
}
.mainmenu li:hover a,.mainmenu li:hover a:visited,.mainmenu li:hover a:hover,.mainmenu li a:hover{
color:#e0e0e0;
}
.mainmenu li:hover li a, .mainmenu li li:hover li a,
.mainmenu li li li:hover li a, .mainmenu li li li li:hover li a,
.mainmenu li:hover li a:visited, .mainmenu li li:hover li a:visited,
.mainmenu li li li:hover li a:visited, .mainmenu li li li li:hover li a:visited
{
color:#e0e0e0;
}
.mainmenu li li:hover, .mainmenu li li li:hover,
.mainmenu li li li li:hover , .mainmenu li li li li li:hover , .mainmenu li li li li li li:hover
{
background: #0552a7;
z-index:9999;
}
.mainmenu li li:hover a,.mainmenu li li li:hover a,
.mainmenu li li li li:hover a, .mainmenu li li li li li:hover a
{
color: #e0e0e0;
}
.mainmenu ul ul a, .mainmenu ul ul a:visited,
.mainmenu li li a, .mainmenu li li a:visited
{
color: #e0e0e0;
}
.mainmenu ul ul a:hover,
.mainmenu li:hover li:hover a,.mainmenu li:hover li:hover a:visited ,
.mainmenu li:hover li:hover li:hover a,.mainmenu li:hover li:hover li:hover a:visited,
.mainmenu li:hover li:hover li:hover li:hover a,.mainmenu li:hover li:hover li:hover li:hover a:visited ,
.mainmenu li:hover li:hover li:hover li:hover li:hover a,.mainmenu li:hover li:hover li:hover li:hover li:hover a:visited,
.mainmenu li:hover li:hover li:hover li:hover li:hover li:hover a,.mainmenu li:hover li:hover li:hover li:hover li:hover li:hover a:visited{
color: #e0e0e0;
}
.mainmenu li:hover li:hover li a,.mainmenu li:hover li:hover li a:visited ,
.mainmenu li:hover li:hover li:hover li a,.mainmenu li:hover li:hover li:hover li a:visited,
.mainmenu li:hover li:hover li:hover li:hover li a,.mainmenu li:hover li:hover li:hover li:hover li a:visited,
.mainmenu li:hover li:hover li:hover li:hover li:hover li a,.mainmenu li:hover li:hover li:hover li:hover li:hover li a:visited{
color: #e0e0e0;
}
/* end of mainmenu css */
```
| CSS Menu code not working in IE6 | CC BY-SA 2.5 | null | 2010-08-27T05:55:29.677 | 2010-08-27T06:36:31.077 | null | null | 158,455 | [
"css",
"internet-explorer-6",
"compatibility"
] |
3,581,824 | 1 | 3,581,830 | null | 11 | 37,243 | How can I implement a search button inside the search box, as seen on a site like Bing?

| Search button inside the search box like Bing | CC BY-SA 3.0 | 0 | 2010-08-27T06:22:28.827 | 2016-02-08T00:05:40.050 | 2011-07-02T18:16:02.027 | 9,314 | 206,613 | [
"css",
"bing",
"search-box"
] |
3,582,230 | 1 | 3,582,543 | null | 2 | 455 | I wanted to achieve the following layout.

basically 1 div placed inside the other.
Div1 has circle as .(size of div varies)
I want to position Div2 so as i always get the above layout
I tried using [centering a div inside another](https://stackoverflow.com/questions/114543/how-to-center-div-in-div) ..didnt work.
Do I have to specify top and left for Div2??
I want to be able to define Div2 dimension wrt Div1.
Any help.
Edit
Using the following styles and js
```
.circle
{
width: 176px;
height: 176px;
top: 0;
left: 0;
background: url('images/circle.png') no-repeat left top;
display :block;
}
.inner {
position: absolute;
height: 80px;
margin: auto;
overflow :hidden;
white-space:normal;
}
Jquery :
//parent is the container c
var $circle_div = $("<div>").attr({ id: "circle_" + id });
$circle_div.addClass("circle");
parent.append($circle_div);
$circle_div.css({ "top": 100, "left": 200, position: 'absolute' });
var $inner_div = $("<div>").attr({ id: "text_" + id });
$inner_div.addClass("inner");
$inner_div.html("text_circle_333333333333444444444444" + id);
$circle_div.append($inner_div);
```
Thanks All
| Placing and centering div inside a div | CC BY-SA 2.5 | null | 2010-08-27T07:41:37.013 | 2010-08-30T13:03:12.560 | 2017-05-23T12:07:06.850 | -1 | 158,297 | [
"javascript",
"jquery",
"css"
] |
3,582,304 | 1 | 3,658,605 | null | 2 | 7,830 | How to fix building workspace problem in Zend Studio?
I'm trying to rename project and rename folder of project, however nothing:
> Errors occurred during the build.
Errors running builder 'JavaScript
Validator' on project 'PROJECT'.
java.lang.NullPointerException
| How fix building workspace error in Zend Studio? | CC BY-SA 3.0 | 0 | 2010-08-27T07:57:36.590 | 2011-12-15T18:51:40.463 | 2020-06-20T09:12:55.060 | -1 | 324,189 | [
"zend-studio"
] |
3,582,443 | 1 | null | null | 1 | 162 | > SELECT instmax,
r
FROM
(SELECT instmax,
rownum r
FROM
( SELECT instmax FROM pswlinstmax ORDER BY instmax DESC NULLS LAST
)
WHERE rownum <= 10
)
WHERE r >=6;
# Output

> > SELECT instmax,
r
FROM
(SELECT instmax,
rownum r
FROM
( SELECT instmax FROM pswlinstmax ORDER BY instmax DESC NULLS LAST
)
)
WHERE r between 6 and 10;
# Output

Is there really a definite performance gain among both the query?Can you please clarify me on this?
| why there's a difference of performance gain among both these queries? | CC BY-SA 2.5 | null | 2010-08-27T08:26:55.417 | 2010-08-27T08:59:20.937 | null | null | 432,584 | [
"sql",
"performance",
"select",
"between",
"rownum"
] |
3,582,524 | 1 | null | null | 0 | 155 | Anyone know how I would go about implementing a UI that's very customized, something like this? (Programming in VB.net right now if it matters).
Have yet to deviate from the standard windows form look but I've got a project which I would like to visually style out how I want.
Thanks in advance :)

| How would one create a UI such as this for an application? | CC BY-SA 2.5 | null | 2010-08-27T08:38:02.587 | 2011-12-21T20:13:21.453 | 2011-12-21T20:13:21.453 | 3,043 | 324,426 | [
"vb.net",
"user-interface"
] |
3,583,371 | 1 | null | null | 2 | 2,090 | I'm trying to record video from the Camera using the MediaRecorder. Here's a code snippet
snip..
```
mr.setAudioSource( MediaRecorder.AudioSource.MIC );
mr.setVideoSource( MediaRecorder.VideoSource.CAMERA);
mr.setOutputFormat( MediaRecorder.OutputFormat.THREE_GPP );
mr.setAudioEncoder( MediaRecorder.AudioEncoder.AMR_NB );
mr.setVideoEncoder( MediaRecorder.VideoEncoder.MPEG_4_SP );
mr.setVideoSize( 200, 200 );
mr.setVideoFrameRate( 15 );
```
..snap
Code executes on a MileStone/Droid, non-empty output file will be created. But when I try to view the video, it looks like this:

My first thoughts were about some sort of encoding error, so I tried every possible OutputFormat/VideoEncoder combination, with no effetcs on the result.
LogCat shows the following error
CameraInput: Unsupported parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value)
But I can't figure out, what I may have set wrong. I used camera.getParameters(), set the preview size with the returned params and then pushed them back using camera.setParameters()...
Worked thru every piece of sample code I could find, but still found no solution.
Does anyone have any ideas ?
| Android: recorded video seems *distorted* | CC BY-SA 3.0 | 0 | 2010-08-27T10:40:43.040 | 2012-11-29T23:35:11.167 | 2011-12-23T13:54:39.497 | 476,681 | 393,827 | [
"android",
"video"
] |
3,584,019 | 1 | 3,584,749 | null | 1 | 5,892 | I want to draw text to a GDI Surface and rotate this text by 90 degrees counter clockwise. I would prefer to use DrawText to draw the text because it supports carriage return. I tried to use a font with lfEscapement (see the code below) but the line is not rotated - one line gets rendered over the other. Is there any possibility to rotate the text? Or to render without rotation and rotate the whole device context?
---
Normal text layout:

---
Rotated (desired result):

```
case WM_PAINT:
{
hdc = BeginPaint(hWnd, &ps);
LOGFONT lf = {0};
HANDLE hFont;
ZeroMemory(&lf, sizeof(LOGFONT));
lf.lfWeight = FW_NORMAL;
lstrcpy(lf.lfFaceName, _T("Tahoma"));
lf.lfEscapement = 90;
lf.lfHeight = 30;
hFont = CreateFontIndirect (&lf);
hFont = (HFONT)SelectObject (ps.hdc, hFont);
RECT RectBody = {10,lf.lfHeight+10,::GetSystemMetrics(SM_CXSCREEN)-10,::GetSystemMetrics(SM_CYSCREEN)-lf.lfHeight-20};
{
ScopedLock lock(me->m_mutex);
DrawText (ps.hdc, me->GetMessageString().c_str(), (int)me->GetMessageString().length(), &RectBody, 0);
}
hFont = (HFONT)SelectObject (ps.hdc, hFont);
DeleteObject (hFont);
EndPaint(hWnd, &ps);
break;
}
```
| Rotate Text by 90 degrees with GDI | CC BY-SA 3.0 | null | 2010-08-27T12:20:05.770 | 2016-08-04T12:51:57.150 | 2016-08-04T12:51:57.150 | 366,904 | 193,049 | [
"c++",
"windows",
"winapi",
"gdi"
] |
3,584,297 | 1 | 3,584,488 | null | 9 | 11,949 | I am facing this problem and finding solution for this issue since last 2 weeks.
Right now i have developed an android application for the client perpose, whose size is 54 MB, from which 52 MB of only Images/Photos.
So i want to install it in sd-card on Android SDK 2.2 for that i have already set `android:installLocation="preferExternal"` in the AndroidManifest.xml file. I have created while creating an avd , ,
but it still showing me an error:
> [2010-08-27 17:58:28 - demo_test]
Failed to upload demo_test.apk on
device 'emulator-5554'
[2010-08-27
17:58:28 - demo_test]
java.io.IOException: Unable to upload
file: No space left on device
[2010-08-27 17:58:28 - demo_test]
Launch canceled!

1. Is this memory related issue of internal memory or external memory?
2. What i have to do to run application and still test with emulator?
3. How do i install application in sd-card in Android sdk 2.2?
| Installing application on SD-card in Android sdk 2.2 | CC BY-SA 2.5 | 0 | 2010-08-27T12:52:27.563 | 2014-01-06T14:39:17.680 | 2010-12-21T15:11:45.883 | 213,269 | 379,693 | [
"android",
"installation",
"apk",
"sd-card"
] |
3,584,329 | 1 | 3,584,394 | null | 14 | 21,253 | I am in my way of finishing the graphs for a paper and decided ([after a discussion on stats.stackoverflow](https://stats.stackexchange.com/questions/2067/follow-up-in-a-mixed-within-between-anova-plot-estimated-ses-or-actual-ses)), in order to transmit as much information as possible, to create the following graph that present both in the foreground the means and in the background the raw data:

However, one problem remains and that is overplotting. For example, the marked point looks like it reflects one data point, but in fact 5 data points exists with the same value at that place.
`base graph``points`
It would be ideal if e.g., the respective points get darker, or thicker or,...
Manually doing it is not an option (too many graphs and points like this). Furthermore, `ggplot2` is also not what I want to learn to deal with this single problem (one reason is that I tend to like dual-axes what is not supprted in `ggplot2`).
---
I wrote a function which automatically creates the above graphs and avoids overplotting by adding vertical or horizontal jitter (or both): [check it out!](http://www.psychologie.uni-freiburg.de/Members/singmann/R/raw.means.plot)
This function is now available as `raw.means.plot` and `raw.means.plot2` in the [plotrix](http://cran.r-project.org/web/packages/plotrix/index.html) package (on CRAN).
| How to avoid overplotting (for points) using base-graph? | CC BY-SA 3.0 | 0 | 2010-08-27T12:56:20.967 | 2013-05-31T09:54:58.517 | 2017-04-13T12:44:13.497 | -1 | 289,572 | [
"r",
"graphics",
"plot",
"points"
] |
3,584,805 | 1 | 3,584,933 | null | 571 | 479,270 | Sometimes I come across code such as this:
```
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [1, 4, 9, 16, 25]
fig = plt.figure()
fig.add_subplot(111)
plt.scatter(x, y)
plt.show()
```
Which produces:

I've been reading the documentation like crazy but I can't find an explanation for the `111`. sometimes I see a `212`.
What does the argument of `fig.add_subplot()` mean?
| What does the argument mean in fig.add_subplot(111)? | CC BY-SA 4.0 | 0 | 2010-08-27T13:50:42.520 | 2022-09-16T22:17:39.620 | 2022-09-16T22:17:39.620 | 7,758,804 | 361,427 | [
"python",
"matplotlib",
"subplot",
"figure"
] |
3,584,837 | 1 | 3,584,888 | null | 0 | 308 | Hey all, weird question. My company has an application from another company that records an image taken by a camera connected via Ethernet. Their app is written in C++ and I've been trying to convert/hack it using Java.
I'm able to receive images, but the quality is not the same. The photo on top is from their app and the photo on bottom is from mine:


Any idea why those artifacts are showing up in my version of the app written in Java? It happens with both BMP and JPG images.
The way it works is just through sockets (both the C++ and Java versions)... a command is sent to capture an image and the camera responds by sending the data (bytes). I save a byte array then create a new BufferedImage from them:
```
// Create buffered image from bytes
image = ImageIO.read(new ByteArrayInputStream(imageBytes));
```
Thanks for any input or ideas.
| Artifacts when receiving image from camera in Java | CC BY-SA 2.5 | null | 2010-08-27T13:55:00.457 | 2010-08-27T14:01:06.727 | null | null | 285,476 | [
"java",
"image",
"camera",
"artifacts"
] |
3,585,009 | 1 | 3,585,405 | null | 10 | 15,456 | I want to raise a notification showing an icon in the status bar - so far so good, but actually I would like this icon to be a 3 character String.
So my question is: Is there a way to convert my String into a `Drawable` to display it as Icon in the status bar?
EDIT: I recently found an app which does something similar - Battery Indicator
It shows the current battery level as notification icon in the status bar - I wonder if it really uses different 100 images

| Convert String to Drawable | CC BY-SA 2.5 | 0 | 2010-08-27T14:13:19.020 | 2017-08-10T03:21:50.913 | 2010-08-28T09:28:18.547 | 415,347 | 415,347 | [
"android"
] |
3,585,049 | 1 | 3,585,070 | null | 0 | 3,517 | how do I stretch a form submit button using CSS?
I'd like to have some kind of horizontal padding between the text inside the button and the button left and right end. Is this possible, and if so, how?

Tips for making the button prettier (without using images) are also much appreciated :-).
| How to stretch the form submit button using CSS? | CC BY-SA 2.5 | null | 2010-08-27T14:18:55.997 | 2010-08-27T14:30:20.763 | null | null | 408,089 | [
"html",
"css",
"button",
"padding",
"stretch"
] |
3,585,261 | 1 | 3,586,358 | null | 2 | 215 | following background: i have a Table-valued Function that returns a Table that is a kind of filtered view(views can not be parameterised) on a large table. Now i need many row count values on different conditions. Is it possible to get all count values in one query without having to query this function for every condition?
For the sake of completeness(it doesnt really matter, you may read over it), this is the function:
```
CREATE FUNCTION [dbo].[getRuleConfigBySetSlsRules] (
@fiRuleSet AS TinyInt,
@fiServiceLocations AS NVARCHAR(4000),
@fiRules AS NVARCHAR(400)
)
RETURNS TABLE AS RETURN (
SELECT ruleChangeTo.fiSet, ruleChangeTo.fiClaimStatus, ruleChangeTo.fiRule, ruleChangeTo.fiSL, ruleChangeTo.fiResult,
dimClaimStatus.ClaimStatusName AS OldStatus, dimClaimStatus_1.ClaimStatusName AS NewStatus, locSL.SLName, ruleSet.SetName,
ruleResult.ResultName, locMarketUnit.MarketUnitName, locCountry.CountryName, ruleRule.RuleKey, ruleRule.RuleName, ruleRule.RuleDescription,
locGSP.WCMSName AS GSP_WCMSName, locGSP.Active AS GSP_Active, locGSP.WCMSKeyNumber AS GSP_WCMSKeyNumber,
locSL.Active AS SL_Active, locSL.WCMSName AS SL_WCMSName, locSL.WCMSKeyNumber AS SL_WCMSKeyNumber, locSL.fiSLType,
locSLType.SLTypeName, ruleChangeTo.fiClaimStatus_ChangeTo
FROM locGSP INNER JOIN
locCountry ON locGSP.fiCountry = locCountry.idCountry INNER JOIN
locMarketUnit ON locCountry.fiMarketUnit = locMarketUnit.idMarketUnit INNER JOIN
locSL ON locGSP.idGSP = locSL.fiGSP INNER JOIN
ruleChangeTo ON locSL.idSL = ruleChangeTo.fiSL INNER JOIN
dimClaimStatus ON ruleChangeTo.fiClaimStatus = dimClaimStatus.idClaimStatus INNER JOIN
ruleResult ON ruleChangeTo.fiResult = ruleResult.idResult INNER JOIN
ruleRule ON ruleChangeTo.fiRule = ruleRule.idRule INNER JOIN
ruleSet ON ruleChangeTo.fiSet = ruleSet.idSet INNER JOIN
locSLType ON locSL.fiSLType = locSLType.idSLType INNER JOIN
dimClaimStatus AS dimClaimStatus_1 ON ruleChangeTo.fiClaimStatus_ChangeTo = dimClaimStatus_1.idClaimStatus INNER JOIN
dbo.Split(@fiServiceLocations, ',') AS ServiceLocations ON ServiceLocations.Item = ruleChangeTo.fiSL INNER JOIN
dbo.Split(@fiRules, ',') AS Rules ON ruleChangeTo.fiRule = Rules.Item
WHERE (ruleChangeTo.fiSet = @fiRuleSet)
)
```
And in the following way i can get one count-value, but in fact i need 30 conditions on the same query(the WHERE-clause).

What is the best way to accomplish this in a strong typed dataset without one query for every value? I dont catch that.
This is the query that must be extended(out of the above image)with various status-conditions and their count values:
```
SELECT COUNT(*) AS CountValidReject
FROM dbo.getRuleConfigBySetSlsRules(@fiSet, @ServiceLocations, @Rules) AS RuleConfigFilter
WHERE (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 8)
```
To come to the point: do i need a stored-procedure with a temp-table or something like that or can i create and query a temp table in this sql in the Dataset? I don't want to call for every value.
Thanks
:
This is the final query which returns 1 row with many count-values as columns. Thanks to Steve again for the CASE WHEN hint. Its very efficient.
```
SELECT COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 5) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleAppliesApprovedInvalid,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 5) AND (fiClaimStatus_ChangeTo = 8) THEN 1 ELSE NULL END) AS RuleAppliesApprovedReject,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 5) AND (fiClaimStatus_ChangeTo = 7) THEN 1 ELSE NULL END) AS RuleAppliesApprovedReview,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 9) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleAppliesEscalatedInvalid,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 9) AND (fiClaimStatus_ChangeTo = 8) THEN 1 ELSE NULL END) AS RuleAppliesEscalatedReject,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 9) AND (fiClaimStatus_ChangeTo = 7) THEN 1 ELSE NULL END) AS RuleAppliesEscalatedReview,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 9) AND (fiClaimStatus_ChangeTo = 1) THEN 1 ELSE NULL END) AS RuleAppliesEscalatedValid,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 8) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleAppliesRejectInvalid,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 8) AND (fiClaimStatus_ChangeTo = 1) THEN 1 ELSE NULL END) AS RuleAppliesRejectValid,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 7) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleAppliesReviewInvalid,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 7) AND (fiClaimStatus_ChangeTo = 8) THEN 1 ELSE NULL END) AS RuleAppliesReviewReject,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 7) AND (fiClaimStatus_ChangeTo = 1) THEN 1 ELSE NULL END) AS RuleAppliesReviewValid,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 5) THEN 1 ELSE NULL END) AS RuleAppliesValidApproved,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleAppliesValidInvalid,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 8) THEN 1 ELSE NULL END) AS RuleAppliesValidReject,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 7) THEN 1 ELSE NULL END) AS RuleAppliesValidReview,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 5) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleApplNotApprovedInvalid,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 5) AND (fiClaimStatus_ChangeTo = 8) THEN 1 ELSE NULL END) AS RuleApplNotApprovedReject,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 5) AND (fiClaimStatus_ChangeTo = 7) THEN 1 ELSE NULL END) AS RuleApplNotApprovedReview,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 9) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleApplNotEscalatedInvalid,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 9) AND (fiClaimStatus_ChangeTo = 8) THEN 1 ELSE NULL END) AS RuleApplNotEscalatedReject,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 9) AND (fiClaimStatus_ChangeTo = 7) THEN 1 ELSE NULL END) AS RuleApplNotEscalatedReview,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 9) AND (fiClaimStatus_ChangeTo = 1) THEN 1 ELSE NULL END) AS RuleApplNotEscalatedValid,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 8) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleApplNotRejectInvalid,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 8) AND (fiClaimStatus_ChangeTo = 1) THEN 1 ELSE NULL END) AS RuleApplNotRejectValid,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 7) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleApplNotReviewInvalid,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 7) AND (fiClaimStatus_ChangeTo = 8) THEN 1 ELSE NULL END) AS RuleApplNotReviewReject,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 7) AND (fiClaimStatus_ChangeTo = 1) THEN 1 ELSE NULL END) AS RuleApplNotReviewValid,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 5) THEN 1 ELSE NULL END) AS RuleApplNotValidApproved,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 2) THEN 1 ELSE NULL END) AS RuleApplNotValidInvalid,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 8) THEN 1 ELSE NULL END) AS RuleApplNotValidReject,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 1) AND (fiClaimStatus_ChangeTo = 7) THEN 1 ELSE NULL END) AS RuleApplNotValidReview,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 1) THEN 1 ELSE NULL END) AS AllValidApplies,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 1) THEN 1 ELSE NULL END) AS AllValidNotApplies,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 5) THEN 1 ELSE NULL END) AS AllApprovedApplies,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 5) THEN 1 ELSE NULL END) AS AllApprovedNotApplies,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 7) THEN 1 ELSE NULL END) AS AllReviewApplies,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 7) THEN 1 ELSE NULL END) AS AllReviewNotApplies,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 7) THEN 1 ELSE NULL END) AS AllRejectApplies,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 7) THEN 1 ELSE NULL END) AS AllRejectNotApplies,
COUNT(CASE WHEN (fiResult = 1) AND (fiClaimStatus = 9) THEN 1 ELSE NULL END) AS AllEscalatedApplies,
COUNT(CASE WHEN (fiResult = 2) AND (fiClaimStatus = 9) THEN 1 ELSE NULL END) AS AllEscalatedNotApplies
FROM dbo.getRuleConfigBySlsRules(@ServiceLocations, @Rules) AS RuleConfig
WHERE (fiSet = @fiSet)
```
| Calculations on Subquery in strong typed dataset | CC BY-SA 2.5 | null | 2010-08-27T14:38:47.363 | 2010-08-31T16:19:08.180 | 2010-08-31T16:19:08.180 | 284,240 | 284,240 | [
".net",
"sql",
"sql-server",
"subquery",
"strongly-typed-dataset"
] |
3,585,314 | 1 | 3,585,860 | null | 2 | 443 | I can't get the correct transformation in OpleGL.
I have point3D - P(X,Y,Z), and projection matrix M, which equal to K*(R|T) where
K - camera calibration matrix

(R|T) - point (object) coordinate system transformation (R - rotation matrix, T - translation vector)
As a result we have projected point as p = M*P
I know P,K,R,T, and I wont to calculate p in OpenGl terms.
In OpenCV terms it will be look as follows (little abstraction code):
```
CvMat* R = cvCreateMat(4,4, CV_32F, getRotationData());
CvMat* T = cvCreateMat(4,1, CV_32F, getTranslationData());
CvMat* K = cvCreateMat(4,4, CV_32F, getCameraCalibrationData());
// (R|T)
R->data.fl[3] = T->data.fl[0];
R->data.fl[7] = T->data.fl[1];
R->data.fl[11] = T->data.fl[2];
R->data.fl[15] = T->data.fl[3];
CvMat M = cvMat(4,4, CV_32F);
// M = R*(R|T)
cvMulMat(K, R, &M);
CvMat* P = cvCreateMat(4,1, CV_32F, getTestedPoint3D());
cvMar p = cvMat(4,1, CV_32F); // result transformation
// p = M*P
cvMulMat(&M, P, &p);
// project
float z = p.data.fl[2];
float x = p.data.fl[0] / z;
float y = p.data.fl[1] / z;
printf("Point projection [%f,%f]", x, y);
cvDrawPonit(img, cvPoint(x,y), CV_RGB(255,0,0)); /// <- !!!!
```
How can I translate this logic to OpenGl?
How could I set GL_PROJECTION and what could i do in GL_MODELVIEW mode or some else?
| Geometry -> OpenGL | CC BY-SA 3.0 | 0 | 2010-08-27T14:44:26.593 | 2012-06-13T13:55:25.950 | 2012-06-13T13:55:25.950 | 44,729 | 299,785 | [
"c++",
"opengl",
"opencv",
"glut",
"camera-calibration"
] |
3,585,490 | 1 | 3,585,620 | null | 0 | 3,398 | I am having this issue and I am hoping that it is so simple and that is why I can not figure it out.
I want to use an image divider inbetween navigation `<li>` elements.
Here is my CSS:
```
#nav {
width:70.5%;
padding-left:29.5%;
list-style: none;
margin: 0px auto;
float:left;
background-image:url(images/bk_nav.gif);
background-repeat:repeat-x;
display:block;
text-align:center;
#margin-top:-4px;
}
#nav li {
float: left;
margin: 0px;
text-align:center;
font: 13px/100% Helvetica, Arial, sans-serif;
background-color:#cccccc;
}
.divide
{
position:relative;
float:left;
width:4px;
height:42px;
background-image:url(images/divider.gif);
}
#nav a {
color: #ffffff;
text-decoration: none;
text-align:center;
padding: 14px 25px 14px 25px;
font: 14px/100% Helvetica, Arial, sans-serif;
display: block;
text-align:center;
}
```
Here is the HTML:
```
<ul id="nav">
<li class="page-item-2 current_page_item"><a href="index.html">Home</a></li><span class="divide"></span>
<li class="page-item-20"><a href="aboutus.html">Our Program</a></li>
<li class="page-item-10"><a href="econsus.html">Social</a></li>
<li class="page-item-13"><a href="socialsus.html">Economic</a></li>
<li class="page-item-15"><a href="envsus.html">Environmental </a></li>
<li class="page-item-17"><a href="resources.html">Resources </a></li>
</ul>
```
Currently I only have one divider in there because I am testing it. This code works fine in FF but IE is destroyed by it. Anyone shed some light on this frustrating situation?
UPDATE:
The one is right and the other is not. I was able to create the same error in FF so you can see both. (Just moved the `<span>`)

| CSS Cross-Browser Image Divider within Navigation | CC BY-SA 2.5 | null | 2010-08-27T15:04:20.313 | 2010-08-27T15:23:27.230 | 2010-08-27T15:22:21.387 | 316,429 | 316,429 | [
"css"
] |
3,585,907 | 1 | 3,586,499 | null | 2 | 702 | I'm attempting to parse an Oracle trace file using regular expressions. My language of choice is C#, but I chose to use Ruby for this exercise to get some familiarity with it.
The log file is somewhat predictable. Most lines (99.8%, to be specific) match the following pattern:
```
# [Timestamp] [Thread] [Event] [Message]
# TIME:2010/08/25-12:00:01:945 TID: a2c (VERSION) Managed Assembly version: 2.102.2.20
# TIME:2010/08/25-14:00:02:398 TID:1a60 OpsSqlPrepare2(): SELECT * FROM MyTable
line_regex = /^TIME:(\S+)\s+TID:\s*(\S+)\s+(\S+)\s+(.*)$/
```
However, in a few places in the log there much are complicated queried that, for some reason, span several lines:

Two things to point out about these entries is that they appear to cause some sort of corruption in the log file, because they end with unprintable characters, and then suddenly the next entry begins on the same line.
Since this obviously rules out capturing data on a per-line basis, I think the next best option is to match everything between the word "TIME:" and either the next instance of "TIME:" or the end of the file. I'm not sure how to express this using regular expressions.
Is there a more efficient approach? The log file I need to parse will be over 1.5GB. My intention is to normalize the lines, and drop unnecessary lines, to eventually insert them as rows in a database for querying.
Thanks!
| Matching everything between two specific words using regular expressions | CC BY-SA 2.5 | 0 | 2010-08-27T15:48:09.393 | 2010-08-27T18:40:21.300 | 2010-08-27T17:43:26.323 | 145,831 | 145,831 | [
"c#",
"ruby",
"regex",
"text-parsing",
"logfiles"
] |
3,586,235 | 1 | 3,589,352 | null | 3 | 5,308 | I have a relative layout which looks like this:

Here is the code:
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/nameText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip"
android:layout_alignParentLeft="true"
android:text="Symbol"
/>
<TextView
android:id="@+id/priceText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip"
android:layout_toRightOf="@+id/nameText"
android:gravity="right"
android:text="100"
/>
<TextView
android:id="@+id/changeText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dip"
android:layout_toRightOf="@+id/priceText"
android:gravity="right"
android:text="1.3"
/>
</RelativeLayout>
```
How can I get the company name to line up next to the number 1.3?
| How to create column-like layout for ListView rows? | CC BY-SA 2.5 | null | 2010-08-27T16:25:14.403 | 2012-08-14T20:01:06.613 | null | null | 19,875 | [
"android",
"listview",
"layout",
"textview",
"android-relativelayout"
] |
3,586,287 | 1 | null | null | 2 | 2,304 | I have a PNG file to which I want to add the properties
1. Pixels per unit, X axis
2. Pixels per unit, Y axis
3. Unit specifier: meters
These properties are explained in the PNG specification: [http://www.w3.org/TR/PNG-Chunks.html](http://www.w3.org/TR/PNG-Chunks.html)
I have programmatically read the properties of the `.png` to check if the properties exists, so that I can set the value for this properties, but I could not see this properties in the `.png` file.
(Refer pixel-per-unit.JPG)
How can we add properties to the `.png` file?
regards

| How to add a property to a PNG file | CC BY-SA 4.0 | null | 2010-08-27T16:33:56.003 | 2021-10-26T15:16:23.247 | 2021-10-26T15:16:23.247 | 16,587,746 | 223,755 | [
"c#",
".net",
"png",
"file-properties"
] |
3,586,362 | 1 | 3,586,369 | null | 0 | 1,243 | Not sure if I'm having a stupid day or not but wondering if there is a hack around this.
When I have a multi-line list item with no list style, I get this indent as if the bullet should be there.
Anyway arond this?

| Multi Line list items indent | CC BY-SA 2.5 | null | 2010-08-27T16:43:50.617 | 2010-08-27T16:52:31.360 | null | null | 157,503 | [
"css"
] |
3,586,377 | 1 | 3,600,767 | null | 5 | 508 | I have the following situation between these three tables:

Before I start explaining what I'm trying to accomplish here, let me clarify three things:
1. I drew the model on EntityFramework, but this is actually the database view. Just assume that the fields type match between tables;
2. I know that this database model sucks. But changing it is out of question. I know that it would make my life easier.
3. I'm using Visual Studio 2008 and .Net 3.5 on this project. But I'm accepting solutions based on Visual Studio 2010 and .Net 4.0 as well.
So, as I tried to demonstrate on the picture above, in this project that I'm working on I got these 3 tables. One of then, , associates a file to a transaction line, that is part of a full transaction.
Now, what I'm trying to associate here is and . However, doens't have field from the table. The fields and from this table stand for an composite key on . And indeed, 's and never repeat. They could be the primary key, but then again, I can't touch the database structure.
I try to associate and by creanting an of One To Many From to . After that, I select the and change to the screen, then I select .
The data that he askes me to fill on the model screen are:
- - - -
All of the scalar properties are set by theirs corresponding database fields, which are of the same name. But when I'm going to specify the linkage with table, the only scalar field that I can specify there is , which I don't have on the table.
I also tried to set 's and scalar properties entity key flag to true, and entity flag to false, but with no success, since the program warns me that database is a primary key but is not set like one on the entity.
Is it possible to link and with ? Is there any workaround for this situation?
Special Note: is indeed the primary key for . Others tables link with it by this field. The here is an exception to the common sense rule. :(
| Is it possible to create an association between two normal fields in Entity Framework, thereby ignoring the primary key? | CC BY-SA 2.5 | 0 | 2010-08-27T16:46:00.247 | 2010-08-30T13:27:40.850 | null | null | 415,778 | [
"c#",
".net",
"entity-framework"
] |
3,586,740 | 1 | 3,586,778 | null | 0 | 3,217 | how can i make this....
[goto this link and see the text sliding after regular intervals](http://www.scriptocean.com/dticker.html)
well i want to learn to make this so that i could make
...
it is supposed to be a dynamic news scroller.... but to make this i know i will have to learn the thingy on the link that i gave you... then the next steps are going to take me to
my so abstract question, actually i don't have any knowledge about this or what this methodology\technique... so i need some leads on how to learn to make this... i have been experimenting with JavaScript set Timeout function but that didn't work...
so the leads
- `CSS Drop Down Menus``Flash Drop Down Menus`- -
p.s.
| HTML\JavaScript - News Scroller - Sliding Text Effect | CC BY-SA 2.5 | 0 | 2010-08-27T17:32:32.327 | 2010-08-27T17:38:28.903 | null | null | 158,455 | [
"html",
"css",
"dhtml",
"slideshow"
] |
3,586,871 | 1 | null | null | 261 | 160,428 | How would it be possible to include both bold and non-bold text in a uiLabel?
I'd rather not use a UIWebView.. I've also read this may be possible using NSAttributedString but I have no idea how to use that. Any ideas?
Apple achieves this in several of their apps;
Examples Screenshot: 
Thanks!
- Dom
| Bold & Non-Bold Text In A Single UILabel? | CC BY-SA 3.0 | 0 | 2010-08-27T17:52:43.083 | 2022-02-09T08:53:22.067 | 2019-05-09T20:16:38.623 | 1,085,736 | 433,213 | [
"ios",
"objective-c",
"swift",
"uilabel",
"nsattributedstring"
] |
3,587,333 | 1 | 3,587,398 | null | 0 | 1,824 | 
I am reading a text file line by line with VBA into a worksheet. it's often returning these characters. Does anyone know how to remove them?
this is how i am reading it:
```
Sub ReadAsciiFile()
Dim sFileName As String
Dim iFileNum As Integer
Dim sBuf As String
Dim i As Integer
i = 1
' edit this:
sFileName = "usmap.txt"
' does the file exist? simpleminded test:
If Len(Dir$(sFileName)) = 0 Then
Exit Sub
End If
iFileNum = FreeFile()
Open sFileName For Input As iFileNum
Do While Not EOF(iFileNum)
Line Input #iFileNum, sBuf
' now you have the next line of the file in sBuf
' do something useful:
activesheet.Cells(i, 1) = sBuf
i = i + 1
Debug.Print sBuf
Loop
' close the file
Close iFileNum
End Sub
```
| Getting questionmark characters (?) when reading file line by line into worksheet | CC BY-SA 2.5 | null | 2010-08-27T19:03:45.793 | 2018-11-20T14:09:20.850 | 2010-08-27T20:26:27.413 | 258,127 | 117,700 | [
"excel",
"vba"
] |
3,587,747 | 1 | 3,587,817 | null | 1 | 68 | 
I receive this error when files are loading and sometimes after they have stopped loading. It only happens with this site, not with my other django sites. I can't make any sense of this one. Can anyone tell me what's going wrong here?
| Python error, only in the command window. Causes site to hang when loading | CC BY-SA 2.5 | null | 2010-08-27T20:03:58.767 | 2010-08-27T20:20:55.807 | null | null | 355,697 | [
"python",
"django"
] |
3,588,103 | 1 | 3,589,127 | null | 0 | 1,134 | I'm having trouble with this dropline menu - how can I get the subnav to line up with the right edge of the parent item? what I'm trying to achieve would look something like this:

If I were hovering over the first item on the left of the nav item. Here is a link to sample code. Thanks!
| Right-aligned CSS / jQuery dropline menu | CC BY-SA 3.0 | 0 | 2010-08-27T21:03:58.460 | 2012-04-14T16:26:57.820 | 2012-04-14T16:26:57.820 | 201,255 | 201,255 | [
"css"
] |
3,588,293 | 1 | 3,589,047 | null | 14 | 17,964 | Tick labels for ticks bigger than about 10'000, get formatted to 1x10^4 for example. Whereas the exponential part appears above the corresponding axes. This misbehavior has been well described on [on matlab central](http://www.mathworks.com/matlabcentral/newsreader/view_thread/270088) as well, but without a solution.
Thanks for your help.
---
The 'quick trick'
```
set(gca, 'YTickLabel',get(gca,'YTick'))
```
did not work when applied to bar3, as can be seen on the following figure.

| Suppress exponential formatting in figure ticks | CC BY-SA 2.5 | 0 | 2010-08-27T21:34:34.630 | 2014-06-18T15:18:21.873 | 2014-06-18T15:18:21.873 | 2,982,225 | 426,834 | [
"matlab",
"plot",
"label",
"number-formatting"
] |
3,588,351 | 1 | 3,634,210 | null | 2 | 522 | I have a to-one relationship between a Document and Settings model:

On creation of a Document, a corresponding Settings object is created. The models are persisted to core data.
When relaunching after creating a few documents (and the associate settings), the application reloads a list of documents to select using:
```
// Load delegate from shared application and context from delegate.
SampleAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context = delegate.managedObjectContext;
// Create new request.
NSFetchRequest *request = [[NSFetchRequest alloc] init];
// Create entity description using delegate object context.
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Document" inManagedObjectContext:context];
// Set entity for request.
[request setEntity:entity];
// Load array of documents.
NSError *error;
NSArray *documents = [context executeFetchRequest:request error:&error];
// Rlease descriptor.
[descriptor release];
// Release request.
[request release];
// Done.
return documents;
```
The list appears fine (the documents are loading). However, when attempting to access the settings for any of the documents the program exits giving:
> Program received signal: “SIGABRT”.
The modifications to the settings are triggered when a user selects a button. Strangely enough, the program does not crash if the following snippet is added just before returning the documents on load (i.e. if the relationships are accessed while loading):
```
for (Document *document in documents)
{
NSLog(@"document.name: %@", document.name);
NSLog(@"document.settings.stroke: %@", document.settings.stroke);
NSLog(@"document.settings.stroke: %@", document.settings.stroke);
}
```
The property for the relationship is "(nonatomic, retain)" and uses "@dynamic". Any ideas? Thanks!
| Core Data Relationship Failing to Load To-One Relationship | CC BY-SA 2.5 | null | 2010-08-27T21:48:08.173 | 2010-09-03T08:45:45.690 | null | null | 259,900 | [
"iphone",
"objective-c",
"cocoa-touch",
"core-data"
] |
3,588,653 | 1 | 3,588,731 | null | 9 | 6,270 | This is somewhat related to another question I asked: [Translate GPS coordinates to location on PDF Map](https://stackoverflow.com/questions/2870166/translate-gps-coordinates-to-location-on-pdf-map). That got me to this point, now I'm stuck on the math.
Let's say I have a floor plan of a building, I've taken gps coordinate readings from each corner of the building. Also assume that the floor plan is lined up with the latitude and longitude.
How do I convert a GPS coordinate to a X,Y position on this map? I can't seem to get the math right.

| Convert GPS coordinates to coordinate plane | CC BY-SA 2.5 | 0 | 2010-08-27T22:56:48.473 | 2022-09-30T18:18:09.013 | 2017-05-23T12:16:24.547 | -1 | 114,696 | [
"iphone",
"math",
"dictionary",
"gps",
"coordinate-systems"
] |
3,588,950 | 1 | null | null | 0 | 2,618 | I'm new to AS3. Learning how to create classes. Is `comp = new HouseObjects` creating a new class? Is comp creating an instance of the HouseObjects? I realize that this is inside public class TreeHouse. I'm thinking that HouseObjects, how I set it up is not a class...not sure what the correct way to set up classes and properties.
Also I noticed, that when I tried to link another movieclip using the same linkage name HouseObjects--it asked to enter a unique class. I'm trying to create multiple instances from the same class called HouseObjects.

package {
```
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
public class TreeHouse extends MovieClip
{
private var comp:MovieClip;
var powerData:int; // stores user data (of selected data)
//var currentPower:int; // stores current power
public function TreeHouse()
{
comp = new HouseObjects; // linkage in library
comp.power = 2; // amount of power
comp.name = "comp";
comp.buttonMode = true;
comp.bstate = 0; // button state
//add event listeners -- listens to functions that are called
comp.addEventListener(MouseEvent.MOUSE_OVER, rolloverToggle);
comp.addEventListener(MouseEvent.MOUSE_OUT, rolloutToggle);
comp.addEventListener(MouseEvent.CLICK, toggleClick);
comp.addEventListener(MouseEvent.CLICK, toggleClick);
stage.addChild(comp); // add computer to stage -----------------------------------
trace("tracing...");
comp.x = 100;
comp.y = 100;
}
// function rollOver --------------------------------------------------------------
function rolloverToggle(e:MouseEvent) {
if (e.currentTarget.currentFrame == 1)
e.currentTarget.gotoAndStop(2);
if (e.currentTarget.currentFrame == 3)
e.currentTarget.gotoAndStop(4);
}
// function rollOut-- --------------------------------------------------------------
function rolloutToggle(e:MouseEvent) {
if (e.currentTarget.currentFrame == 2)
e.currentTarget.gotoAndStop(1);
if (e.currentTarget.currentFrame == 4)
e.currentTarget.gotoAndStop(3);
}
// function toggleClick-------------------------------------------------------------
function toggleClick(e:MouseEvent) {
// On MouseEvent gotoAndStop(Frame Number)
if (e.currentTarget.currentFrame == 2)
{
e.currentTarget.gotoAndStop(3);
e.currentTarget.bstate = 1;
}
if (e.currentTarget.currentFrame == 4)
{
e.currentTarget.gotoAndStop(1);
e.currentTarget.bstate = 0;
}
//var powerData:int = HouseObjects[e.currentTarget.power]; // set power value
// Find out which object selected-------------------------------------------------
//trace("movieClip Instance Name = " + e.currentTarget); // [object Comp]
//trace(houseArray[e.currentTarget.name]); // comp
trace("using currentTarget: " + e.currentTarget.name); // comp
//trace("powerData: " + powerData); // power of user data
//trace("houseArray: " + houseArray[0]); // the 0 index of house array
trace(e.currentTarget.power); // currentTarget's power************
}
} //end of class
} // end of package
```
| Creating Classes and Properties in AS3 | CC BY-SA 2.5 | null | 2010-08-28T00:38:24.147 | 2010-08-28T17:45:12.270 | 2010-08-28T01:02:25.307 | 422,157 | 422,157 | [
"actionscript-3",
"function",
"properties",
"class",
"object"
] |
3,589,274 | 1 | 3,589,486 | null | 1 | 315 | I want a Flash Builder plugin that takes ugly unformatted mxml and makes it beautiful

+1 if you would like something like this also.
Edit: noticed that screenshot is barely legible. Larger version here: [http://dl.dropbox.com/u/672147/mxmlFormatterDream.png](http://dl.dropbox.com/u/672147/mxmlFormatterDream.png)
| What's an awesome formatter for MXML/AS3? | CC BY-SA 2.5 | null | 2010-08-28T02:58:24.697 | 2014-01-10T06:22:12.207 | null | null | 66,584 | [
"apache-flex",
"flash",
"actionscript-3",
"mxml",
"flash-builder"
] |
3,589,578 | 1 | null | null | 0 | 2,170 | Wondering how I can do this with CodeIgniter?

Any help is greatly appreciated!
Thanks.
| Alphabetical lists in CodeIgniter | CC BY-SA 2.5 | null | 2010-08-28T05:18:26.817 | 2010-08-28T06:00:34.937 | null | null | 266,889 | [
"php",
"list",
"codeigniter"
] |
3,589,587 | 1 | 3,589,605 | null | 4 | 2,511 | I'm building a database and have run into a problem that I can't seem to wrap my mind around. The database is much more complex than what is pictured, but the problem can be distilled into the table structure below.
The issue is that every employee has a manager and every manager is an employee. It would seem that these tables have to reference eachother. However, this doesn't seem to work correctly when I set this up.

I'm using cakephp. What is the name of this relationship type? Is this the wrong design? What is the proper design for this situation? I would like it to work as automagically as possible.
| How to design a database with a table that needs to reference itself? | CC BY-SA 2.5 | 0 | 2010-08-28T05:21:44.503 | 2010-08-28T13:41:10.453 | 2010-08-28T13:41:10.453 | null | 124,725 | [
"database-design"
] |
3,589,646 | 1 | 3,589,717 | null | 10 | 996 | My designer believes this cannot be done, however it seems possible to me. (Although I have limited CSS experience). However, he also said the background couldn't be fixed, and stackoverflow has proved his wrong in the past; so I question his knowledge.
JQuery can be used if this cannot be done in pure CSS.

The top half will be a gradient that has full flexible to skew left, right, up, down without much distortion. The bottom half is an image that is ideally made for the 1280 x 1024 resolution (as this is the most popular browser display resolution). Then depending on the requirements needed it will sketch and skew to whatever size it needs. Still allowing all of the image to be seen.
The ration between the top half and bottom half is always 50% 50% independent of browser resolution.
I would also like if both the top and bottom parts are fixed.
In a perfect world (one without IE), id like to do this with css3 gradients and multiple backgrounds in 1 DIV. However, because IE9 isnt out yet, I think the best way to approach it would be 2 divs in a DIV container and using a PNG repeating background for the top div.
It should be noted I am going to use css3pie.com to allow some CSS3 for IE6-8 (but I dont want to rely on it, unless 100% proven)
Is this possible with just CSS? How would you do it?
If not possible with just CSS, is there a way I can get JavaScript/JQuery to aid?
I am thinking a base of 1280 x 1024 isn't the best idea because it seems to have an odd radio.
`Edit 1`
Oh yeah, I have a WIP too:
[http://meyers.ipalaces.org/extra/](http://meyers.ipalaces.org/)
It looks good in 1280 x 1024...now its just getting the whole resizing of the top DIV to be 50% so the image is 50%.
I'd still like ALL of the water to be seen, because I like the look of the rocks at the bottom. However, I am open to alternative ideas that don't accomplish what I want 100%, but come close.
`Edit 2`
How about using the top gradient as the true CSS2 background and then just putting a `<img>` at the bottom of it to resize? Perhaps that will allow for CSS2 ability. I am reference some work-around techniques here: [A list apart](http://www.alistapart.com/articles/supersize-that-background-please/)
`Edit 3`
I am still looking for results that work on IE6 and also don't cause Internet explorer to lag. I am setting a bounty of 50 to help attract more attention.
| 2 part CSS "wallpaper" that resizes to browser | CC BY-SA 2.5 | 0 | 2010-08-28T05:44:56.550 | 2010-09-10T06:21:33.893 | 2010-09-06T16:02:13.933 | 130,204 | 130,204 | [
"javascript",
"jquery",
"html",
"css",
"layout"
] |
3,589,738 | 1 | 3,589,951 | null | 2 | 979 | I am new to cakePHP and I am trying to figure out how to create the following relationship:

The employees.manager_id will point to the employees.id of their manager. So, in other words, employee Jason will have a manager of Jill. Jason is employees.id 1 with employees.manager_id 2. Jill is employees.id 2 and employees.manager_id null.
How do I setup the model controller in such a way that when indexing, adding, editing, etc. that the manager_id should be looked up from the same table. For example, when indexing, I would like to see that 'Jill' is the manager of jason rather than the number 2...
| How to setup relationship in cakephp for a one-to-one recursive relationship? | CC BY-SA 2.5 | 0 | 2010-08-28T06:29:01.377 | 2010-08-28T07:55:58.250 | null | null | 124,725 | [
"cakephp"
] |
3,590,368 | 1 | null | null | 1 | 421 | i have one table with two columns as shown in picture

table columns names are (MAXDATE,AMOUNT).
if you see we have
```
first date range (from current date to 20-jan-2010)
second date range from 20-jan-2010 to 30-jan-2010
3rd range is from 20-jan-2010 to 31-jan-2010.
```
at the execution of page user enter the start and end date.
for example, if user put
```
start date: 18-jan-2010
end date: 23-jan-2010
```
then he has 2 dates in first options and 3 dates in second options.
what i want to calculate in sql
```
1. how many days in first range (if any this depends on supplied dates from user)
2. how many days in 2nd range (if any this depends on supplied dates from user)
3. how many days in 3rd range (if any this depends on supplied dates from user)
```
Thanks
| calculate total number of days in specied dates | CC BY-SA 2.5 | 0 | 2010-08-28T10:20:27.353 | 2010-08-28T11:32:45.330 | null | null | 172,319 | [
"php",
"sql",
"mysql",
"date"
] |
3,590,427 | 1 | 3,608,744 | null | 0 | 1,645 | I have a tabbar application. Second tab had a drill down table list with Navigation Controller. I also want to implement a segmented control inside a tool bar that shows different table entries as per the selected switch in segmented control. I am a little confused as to how to implement this?
Screen-shot -

This is the view in second tab controller an instance of the generic UIViewController. Blue Background is a UIView that contains a segmented control (1,2,3,4). The steel blue navigation bar at the top is a simulated UI Element from Interface Builder. I need to put a navigation Controller such that it has a list table view that changed depending on the switch selected in segmented control UI.
I have following options
1. Add UINavController as root controller for second tab directly with table view inside it. In that case how do I accomodate the UIToolbar having segmented control?
2. I add UISegmentedControl as part of the view of Second Tab's view controller and add navigation based table view as another element to that view. Is this doable? How can I add a nav based controller to a UIView and control the frame so that it does not cover the UIToolBar.
I hope I am making sense. Please lemme know if you have any suggestions. Thanks.
| UINavigationBar with TableView and Segmented Control inside UITabBar | CC BY-SA 2.5 | null | 2010-08-28T10:41:54.463 | 2010-08-31T11:58:24.380 | 2010-08-28T10:50:58.360 | 154,967 | 154,967 | [
"iphone",
"uitableview",
"uinavigationcontroller",
"uitabbarcontroller",
"uitoolbar"
] |
3,590,456 | 1 | 3,621,168 | null | 1 | 2,671 | The demo page: [CLICK HERE](http://meyers.ipalaces.org/WIP_BRIAN/)
I have made a picture to show:

As clearly seen in the picture, there is a gap from the div `left_bg` and the div `middle_bg`. The `left_bg` has no content, and its width should be fluid and fit inside it's div container `top-container`. Just to help demonstrate the gap I have it set `left_bg` to `width:500px`. However, Please note that the width should be fluid. The div `middle_bg` will also be fluid, as it will allow for different text longer or shorter.
How can I get rid of this gap and allow `left_bg` to fit?
I am thinking that perhaps using CSS like a table would accomplish what I am after. I tried tweaking and messing around but I could not quite get it to work. I have set `100 rep bounty` to assist me with this problem.
| How to make div expand all the way to the right | CC BY-SA 2.5 | 0 | 2010-08-28T10:52:55.583 | 2010-09-02T15:43:15.463 | 2010-09-01T13:07:04.720 | 130,204 | 130,204 | [
"xhtml",
"html",
"css"
] |
3,590,521 | 1 | 3,590,525 | null | 0 | 92 | I hope someone can help me since I have no clue whats going on here.
I have a table with an image in each row (at the beginning).
Each image has tooltip (title attibute). HTML looks lie this:
```
<td align="center">
<input type="hidden" value="0" />
<img src="/img/prognosis/2green.png" title="Augsburg-Göggingen ">
</td>
```
To make the table sortable I added a hidden input with a value, that is the criteria for sorting.
Everything looks fine until I delete the .png file.
Then it looks like this:

The grey rectangle's width is dependant on the tooltip's length.
How can this happen?
Any help appreciated! THX!
| HTML: Missing image resource has strange effect on ToolTip | CC BY-SA 2.5 | null | 2010-08-28T11:11:30.610 | 2010-08-28T11:12:56.463 | null | null | 338,476 | [
"html"
] |
3,590,572 | 1 | 3,590,589 | null | 0 | 1,123 | I am looking to make video thumbnails like on facebook but I am not able to get that play button over the thumbnail like on facebook.

```
<a href="watch-video.php?c=1244">
<img src="http://img.youtube.com/vi/X0OdLlX-cIw/1.jpg">
<b></b>
</a>
```
```
.wall_video a {display: block; width: 128px; height: 96px; padding: 4px; border: 1px solid #cccccc; position: relative}
.wall_video a img {display: block; width: 128px; height: 96px; }
.wall_video a b {background: url(images/play-icon.png) no-repeat; display: block; width: 28px; height: 30px; position: absolute;}
```
When I try to float the `img` then the button goes right on top. At first I thought its position:relative and negative top margin but when I checked the source of facebook they dont use relative positioning.
| How to make video thumbnails like Facebook [CSS] | CC BY-SA 2.5 | null | 2010-08-28T11:30:06.597 | 2010-08-28T11:35:41.503 | null | null | 205,024 | [
"css"
] |
3,590,690 | 1 | 3,590,755 | null | 0 | 1,037 | I'm developing a GTK app, and would like to print some messages over existing widgets rather than displaying them in the status bar, kind of like the way Mendeley does it when no document is selected:

(as opposed to what is displayed in the right pane when you select a document:)

Should I dynamically create a panel, label, ... with the appropriate message and destroy it when needed, or is there a simpler / better way?
| PyGTK: adding text over widgets | CC BY-SA 2.5 | 0 | 2010-08-28T12:11:11.450 | 2010-08-28T12:32:26.967 | null | null | 284,696 | [
"python",
"gtk",
"pygtk"
] |
3,590,905 | 1 | 3,591,526 | null | 38 | 68,668 | I'm trying to plot a log-log graph that shows logarithmically spaced grid lines at all of the ticks that you see along the bottom and left hand side of the plot. I've been able to show gridlines by using `matplotlib.pyplot.grid(True)`, but this is only showing grid lines for me at power of 10 intervals. So as an example, here is what I'm currently getting:

I'd really like something with grid lines looking more like this, where the gridlines aren't all evenly spaced:

How would I go about achieving this in Matplotlib?
| How do I show logarithmically spaced grid lines at all ticks on a log-log plot using Matplotlib? | CC BY-SA 3.0 | 0 | 2010-08-28T13:30:02.783 | 2020-04-13T16:02:59.403 | 2018-01-08T23:07:08.063 | 63,550 | 129,475 | [
"grid",
"matplotlib"
] |
3,591,374 | 1 | 3,591,385 | null | 2 | 16,953 | 
when trying to start eclipse, i receive the message in the image.
when trying to start other instance of eclipse, i receive a message saying: "failed to create the java virtual machine".
How can i solve it?
| Eclipse won't start | CC BY-SA 2.5 | null | 2010-08-28T15:48:40.350 | 2010-08-28T16:26:10.210 | 2010-08-28T16:12:44.000 | 101,258 | 243,967 | [
"java",
"eclipse"
] |
3,591,521 | 1 | 3,591,566 | null | 0 | 92 | I am trying to setup a Rails environment via CPanel. I've tried on several distinct hosting environments (on all of which I used CPanel to create the project) and I get the following:

Is this something done wrong - I have to first create models/controllers etc - or something I need to bark up my hosting provider's tree about?
| Setting up Rails for the first time - is this normal? | CC BY-SA 2.5 | null | 2010-08-28T16:33:04.497 | 2013-10-26T18:00:13.463 | null | null | 248,129 | [
"ruby-on-rails",
"installation",
"cpanel"
] |
3,591,650 | 1 | 3,592,492 | null | 0 | 835 | I saw many examples of how to draw a rounded rectangle using iPhone SDK. What I really need is a trimmed corner rectangle, something that will look as follows:

Thanks,
Josh
| How do I draw a rectangle with clipped, not rounded, corners on the iPhone? | CC BY-SA 2.5 | null | 2010-08-28T17:08:46.737 | 2010-08-29T04:35:36.950 | 2010-08-29T00:30:58.160 | 19,679 | 371,684 | [
"iphone",
"quartz-graphics"
] |
3,592,067 | 1 | 3,592,092 | null | 0 | 623 | 
Just finishing up my college project and I want to place a background image as the div background. The div is on the right hand side, the 'main content' area.
Where can I find a notebook type background image to simulate that the forms are in a textbook? Also, how can I account for variable height of the forms? Just stretch the image?
Any tutorials?
| How to set a background to a div of variable height? | CC BY-SA 2.5 | null | 2010-08-28T19:08:52.033 | 2010-08-28T23:04:12.167 | null | null | null | [
"css",
"html",
"background-image"
] |
3,592,124 | 1 | 3,594,597 | null | 1 | 966 | i am using PSChildPaneSpecifier on Setting bundle to show Acknowledgements about my application on setting bundle ,so how can handle my plist file to show many texts ? like iwork apps Acknowledgements
thank you
i mean something like this :

| A question about PSChildPaneSpecifier [iPhone SDK] | CC BY-SA 2.5 | 0 | 2010-08-28T19:25:47.533 | 2010-08-29T11:51:19.780 | 2010-08-29T11:48:39.797 | 199,173 | 199,173 | [
"iphone"
] |
3,592,239 | 1 | 3,592,480 | null | 2 | 1,359 | So I have a bunch of javascript to make some random points, and then connects them via a minimum spanning tree. That all works fine.
Then after that it draws the points and paths onto the canvas; and it draws an image like this:

- Randomly generated each time.
The problem I have with this, is that I'd like to have each of the circles be a black circle with a yellow outline. The circles are drawn like so:
```
context.fillStyle = "#ffff00";
for(var i = 0; i < syscount; i++){
context.moveTo(systemsX[i],systemsY[i]);
context.arc(systemsX[i],systemsY[i],4,0,Math.PI*2,true);
}
context.fill();
```
and that works fine, but I want to draw a black circle, and have a yellow trace. I want to do it this way because it's much easier than stopping the lines that join the dots stop a few pixels earlier than they normally would.
This was my attempt:
```
context.fillStyle = "#000000";
for(var i = 0; i < syscount; i++){
context.moveTo(systemsX[i],systemsY[i]);
context.arc(systemsX[i],systemsY[i],ssize,0,Math.PI*2,true);
}
context.fill();
context.strokeStyle = "#ffff00";
for(var i = 0; i < syscount; i++){
context.moveTo(systemsX[i]+ssize,systemsY[i]);
context.arc(systemsX[i],systemsY[i],ssize,0,Math.PI*2,true);
}
context.stroke();
```
but it draws this:

?!! It redraws over the other path. Why?!
Zip of the page: [http://rapidshare.com/files/415710231/page.zip](http://rapidshare.com/files/415710231/page.zip) (html file and a css file inside the zip). The snippet of code for drawing the circles starts at line 164.
| Javascript Canvas drawing problem | CC BY-SA 2.5 | 0 | 2010-08-28T20:05:58.497 | 2010-08-28T22:00:23.383 | 2010-08-28T20:53:57.067 | 2,214 | 432,913 | [
"javascript",
"html",
"canvas"
] |
3,592,365 | 1 | 3,592,409 | null | 2 | 157 | I have two UIImage objects as follow:
image1:

image2:

I wish to combine the two images via code so I can get the following image:

My graphics skills in iPhone are really poor... so any sample code will be greatly appreciated.
Thanks!
Josh
| Help needed with UIImage manipulation | CC BY-SA 2.5 | null | 2010-08-28T20:39:23.910 | 2010-08-28T20:51:00.497 | null | null | 371,684 | [
"iphone",
"uiimage"
] |
3,592,748 | 1 | 3,593,146 | null | 0 | 112 | I have this CSS Menu. It's fully functional.

But when I put it in my page inside some table cell, it blows up like this. Don't mind the silver and the blue lines, they are from the page.

Now I have debugged the page and the menu itself. No error still this weird behavior. Then I got another menu and put that in here and it showed the same error. Any idea why is this happening?
I could paste the code but I don't think anybody is going to go through 500 lines of HTML and 100 lines of CSS.
I am using the latest Firefox. IE6 shows the same behavior.
[CSS Menu Independent in a page](http://jsfiddle.net/ne4Mv/)
[CSS Menu Inside a complex page](http://jsfiddle.net/5n4Vr/1/)
| CSS Menu Problem | CC BY-SA 2.5 | null | 2010-08-28T22:32:30.873 | 2010-08-29T06:22:02.267 | 2010-08-29T06:22:02.267 | 158,455 | 158,455 | [
"html",
"css",
"cascadingdropdown",
"drop-down-menu"
] |
3,593,110 | 1 | 3,593,157 | null | 2 | 1,910 | I'm trying to achieve table similar to this using css/html only. Is it possible ?

So the white area is the `places` table. This is the HTML for the table :
```
<table class="places">
<tr>
<td class="solid">K</td>
<td> </td>
<td> </td>
<td class="solid">P</td>
<td> </td>
</tr>
<tr>
<td class="solid">25</td>
<td class="solid">26</td>
<td> </td>
<td class="solid">47</td>
<td class="solid">48</td>
</tr>
(...)
</table>
```
And my css :
```
.places{
position:relative;
background:white;
width:160px;
margin:0 auto;
text-align:left;
padding:5px;
border-collapse: collapse;
}
.places tr {
}
.places td {
width:22px;
height:22px;
text-align:center;
}
.solid {
border: 1px solid #d2cdd1;
border-top:none;
background-color:#e7e7e7;
text-align:center;
cursor:pointer;
}
```
I was pretty sure, that although tables are a bit different than other html objects, padding should work here. But it looks that I was wrong. Cellspacing/cellpading have no effect. Currently I was able to get something looking like this :

| Advanced css/html table styling | CC BY-SA 3.0 | null | 2010-08-29T00:56:07.200 | 2017-06-10T12:15:52.960 | 2017-06-10T12:15:52.960 | 4,370,109 | 391,094 | [
"html",
"css",
"html-table"
] |
3,593,512 | 1 | 3,596,824 | null | 5 | 505 | Site is located here: [CLICK TO VIEW THE WEBSITE](http://bit.ly/9sjLoS)
Here is an image of the problem: 
As you can see, using CSS3 `border-radius`, and `background: transparent` I was able to make what looks like a "cutout" from the div. The problem should be obvious that the corners are transparent as well.
I know I could just use an image and problem would be solved, but I want to use CSS3. I think there is probably some ingenious way to get around this problem, but I am not thinking of it. I do want to note that I am using css3pie.com to allow IE6 through IE8 CSS3 functionality.
| CSS3: Transparent Rounded Corner Problem | CC BY-SA 2.5 | 0 | 2010-08-29T04:26:21.950 | 2010-08-29T22:52:42.937 | 2010-08-29T04:48:40.823 | 130,204 | 130,204 | [
"html",
"xhtml",
"css"
] |
3,594,032 | 1 | 3,594,048 | null | 0 | 557 | I am trying to make my app localized. I have followed this procedure [http://www.switchonthecode.com/tutorials/a-simple-localization-example-for-the-iphone](http://www.switchonthecode.com/tutorials/a-simple-localization-example-for-the-iphone). And have deleted all localization and done it over again. I've seen other tutorials with exactly the same procedure.
My view to localize is named InfoView.xib.
I have:
1. rigth-clicked InfoView.xib->Get info -> Make File Localizable
2. added Localization and named it to "sv" (for Swedish language)
3. edited the sv-xib
When the simulator is set to English or any other language, I do get the xib loaded and can present it. But when setting the simulator to Swedish language, the view is not instantiated.
When doing
```
NSLog(@"Language: %@ ",[NSLocale preferredLanguages]);
```
I do get "sv" as the top language code.
("NSLog(@"Locale: %@ ",localeString);" gives "sv_SE")
When trying this
```
[[NSBundle mainBundle] loadNibNamed:@"InfoView" owner:self options:nil];
NSLog(@"InfoView in loadView %@", infoView);
```
It prints "(null)" when simulator is set to "Swedish" but instanstiate with any other language.
This is my setting if I do Get info on my sv-xib, in case it matters:

I have done the cleant targets and did reset the simulator.
What can the problem be? And how is the mapping done between the name I choose when adding a locale (sv) and the simultar/device language setting? Is it the acutal "sv" I named my locale to that must match the device's language code ("sv" is one)?
| Localization of views | CC BY-SA 3.0 | null | 2010-08-29T08:10:21.600 | 2012-07-24T17:14:06.810 | 2012-07-24T17:14:06.810 | 777,408 | 229,144 | [
"iphone",
"objective-c",
"localization",
"internationalization",
"interface-builder"
] |
3,594,086 | 1 | 3,594,119 | null | 25 | 21,832 | In Windows 7, the volume mixer windows has a specific style, with a thick, transparent border, but no title bar. How do i recreate that window style in a winforms window?

I tried setting Text to string.Empty, and ControlBox to false, which removes the titlebar, but then the border also disappears:

| How to create a form with a border, but no title bar? (like volume control on Windows 7) | CC BY-SA 2.5 | 0 | 2010-08-29T08:32:53.183 | 2019-02-18T11:27:59.767 | 2010-08-29T08:54:20.403 | 62,662 | 62,662 | [
"c#",
".net",
"winforms",
"windows-7",
"windows-style-flags"
] |
3,594,236 | 1 | 3,596,948 | null | 12 | 36,893 | I have an entity with a foreign key relationship to an asp.net membership provider users table.
This portion of the model looks like this:

I can't seem to assign the foreign key relationship when inserting the Users table record, the record containing the foreign key to the `aspnet_Users` table. I keep getting the error:
> An item with the same key has already
been added.
The code I'm using looks like:
```
UserAdmin userToAdd = new UserAdmin();
...
userToAdd.aspnet_Users = membershipUser;
//line above OR line below
userToAdd.aspnet_UsersReference.EntityKey = new System.Data.EntityKey("ProjectEntities.aspnet_Users", "UserId", membershipUser.UserId);
db.AddToUsers(userToAdd);
db.SaveChanges();
```
Is the issue that I'm asking the EF to add a new `aspnet_Users` table record (the record for the associated primary key table) when that record is already there?
How would I assign a foreign key value to an entity where the primary key record already exists?
Updated test code block:
```
MembershipUser membershipUser = Membership.CreateUser("[email protected]", "pass", "[email protected]");
Entities db = new Entities();
UserAdmin newUser = new UserAdmin();
newUser.Name = "blah";
newUser.DateAdded = DateTime.Now;
Guid key = new Guid(membershipUser.ProviderUserKey.ToString());
aspnet_Users membershipUserRecord = db.aspnet_Users.Where(u => u.UserId == key).FirstOrDefault();
newUser.aspnet_Users = membershipUserRecord;
//newUser.aspnet_UsersReference.EntityKey = new System.Data.EntityKey("Entities.aspnet_Users", "UserId", membershipUserRecord.UserId);
db.ObjectStateManager.ChangeObjectState(membershipUserRecord, EntityState.Unchanged);
db.AddToUsers(newUser);
db.SaveChanges();
```
This code generates the error:
> An item with the same key has already been added.
| Entity Framework - An item with the same key has already been added. - Error when trying to define foreign key relationship | CC BY-SA 2.5 | 0 | 2010-08-29T09:35:23.103 | 2010-08-29T22:58:31.913 | 2010-08-29T19:40:18.370 | 418,716 | 418,716 | [
".net",
"linq",
"entity-framework",
"linq-to-entities",
"entity-framework-4"
] |
3,594,659 | 1 | 3,594,700 | null | 2 | 310 | I made an application that uses a `ListAdapter` to display some items. In my `getView` method I use `LinearLayout#setPadding()` to define the indention of each view depending of some object specific states.
This worked fine in Android 1.5. Last week I decided to move to 1.6 since it's better suitable for different screen sizes. It all worked fine, but the `ListAdapter` looks really weird now. The padding isn't working correctly anymore.
Does anybody know if there is a difference in the `ListAdapter` or `setPadding` implementation between Android 1.5 and Android 1.6?
===EDIT: Code added===
```
@Override
public View getView(int position, View convertView, ViewGroup parent) {
TextView text = (TextView) View.inflate(lexs, R.layout.law_list_book_view, null);
if (items.get(position) instanceof Chapter) {
LinearLayout chapterView = new LinearLayout(lexs);
chapterView.setOrientation(LinearLayout.HORIZONTAL);
chapterView.setGravity(Gravity.CENTER);
ImageView img = new ImageView(lexs);
img.setPadding(0, 0, 5, 0);
chapterView.addView(img);
chapterView.addView(text);
text.setTextColor(Color.BLACK);
text.setText((CharSequence) items.get(position).getName() + ": " + ((Chapter) items.get(position)).getTitle());
text.setMinWidth(320);
switch (((Chapter) items.get(position)).getLevel()) {
case 0:
text.setTextColor(Color.rgb(0, 0, 0));
break;
case 1:
text.setTextColor(Color.rgb(50, 50, 50));
chapterView.setPadding(10, 0, 0, 0);
break;
case 2:
text.setTextColor(Color.rgb(100, 100, 100));
chapterView.setPadding(20, 0, 0, 0);
break;
case 3:
text.setTextColor(Color.rgb(150, 150, 150));
chapterView.setPadding(30, 0, 0, 0);
break;
case 4:
text.setTextColor(Color.rgb(175, 175, 175));
chapterView.setPadding(40, 0, 0, 0);
break;
default:
text.setTextColor(Color.rgb(200, 200, 200));
chapterView.setPadding(50, 0, 0, 0);
break;
}
if (((Chapter) items.get(position)).isExpanded()) {
img.setImageResource(R.drawable.minus);
} else {
img.setImageResource(R.drawable.plus);
}
if (((Chapter) items.get(position)).isSearched()) {
text.setBackgroundColor(Color.MAGENTA);
}
text.setTextSize(15);
return chapterView;
} else {
LinearLayout paragraphView = new LinearLayout(lexs);
paragraphView.setOrientation(LinearLayout.HORIZONTAL);
paragraphView.setGravity(Gravity.CENTER);
paragraphView.setPadding( (((Chapter) ((Paragraph) items.get(position)).getRoot()).getLevel() * 10) + 15 + 8 , 0, 0, 0);
DisplayMetrics metrics = new DisplayMetrics();
lexs.getWindowManager().getDefaultDisplay().getMetrics(metrics);
ImageView paragraphImg = new ImageView(lexs);
paragraphImg.setImageResource(R.drawable.paragraph);
paragraphView.addView(paragraphImg);
LinearLayout textLayer = new LinearLayout(lexs);
textLayer.setGravity(Gravity.LEFT);
textLayer.setMinimumWidth(metrics.widthPixels / 2);
text.setTextColor(Color.BLACK);
textLayer.addView(text);
textLayer.setOnClickListener(new BookViewOnClickListener(position));
paragraphView.addView(textLayer);
text.setText("Artikel " + (CharSequence) items.get(position).getName());
LinearLayout buttonLayer = new LinearLayout(lexs);
buttonLayer.setGravity(Gravity.RIGHT);
ImageButton mark = new ImageButton(lexs);
if (WorkspaceView.createView(lexs).isFavorite((Paragraph) items.get(position))) {
mark.setBackgroundResource(R.drawable.article_not_favorite);
} else {
mark.setBackgroundResource(R.drawable.article_favorit);
}
mark.setOnClickListener(new BookViewOnClickListener(position));
buttonLayer.addView(mark);
buttonLayer.setPadding(0, 0, 10, 0);
buttonLayer.setMinimumWidth(metrics.widthPixels / 2);
paragraphView.addView(buttonLayer);
text.setTextSize(15);
if (((Paragraph) items.elementAt(position)).isSearched()) {
text.setBackgroundColor(Color.RED);
}
return paragraphView;
}
}
```
===EDIT 2: Screenshot added===

I know that this elements of the list are all level 0 elements and should therefore have no padding (I used logcat to verify the level of the elements. they are all 0). the level of the elements i use in the switch case to check the padding (see code)
| ListAdapter in Android 1.5 and 1.6: are there any differences? | CC BY-SA 2.5 | null | 2010-08-29T12:11:53.767 | 2010-08-29T17:25:19.273 | 2010-08-29T17:25:19.273 | null | null | [
"java",
"android"
] |
3,594,792 | 1 | null | null | 3 | 1,697 | How to make text wrapping like this with semantic and clean HTML, CSS ? With compatible in all browser.

Adding different classes to `<p>` is the only solution I'm thinking if there is no other solution.
but with that way every time client would not be able to change classes, which is drawback.
| How to make uneven text wrapping (not square or round) like this with semantic and clean HTML, CSS? | CC BY-SA 2.5 | null | 2010-08-29T12:47:48.553 | 2010-08-29T13:30:18.483 | 2010-08-29T13:30:18.483 | 84,201 | 84,201 | [
"jquery",
"css",
"xhtml"
] |
3,594,824 | 1 | 3,594,863 | null | 0 | 36 | How would you display / Echo pictures with a name underneeth in the order shown on the example below in php ? Sort of like echoing a friends list. Im looking for how to structure it with code, I guess thats the correct way to explain what I want to achieve, hope that helps.
I tried
```
echo '
<tr>
<td align=\"center\">
<img src=\"hello.png\" alt=\"My Picture\" /><br /> Name
</td>
</tr>
';
```
but that still does not quite work
What i want to acheive,

Sorry for the bad explanation, any help and examples would be helpful
Thanks!
| How to structure outputed data in specific table order | CC BY-SA 2.5 | null | 2010-08-29T12:57:22.330 | 2010-08-29T13:18:04.513 | 2010-08-29T13:02:44.253 | 401,647 | 401,647 | [
"php",
"mysql",
"html"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.