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
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,746,838 | 1 | 5,750,391 | null | 7 | 35,373 |
How can I make plots in MATLAB like in below? 
I won't need labels, so you can ignore them. I tried using normal 2D plot, by giving 0 to y parameter for each data points. It does help, but most of the plot remains empty/white and I don't want that. 
How can I solve this problem?
Edit:
This is how I plot(playing with values of ylim does not help):
```
hold on
for i=1:120
if genders(v_labels(i)) == CLASS_WOMAN
plot(v_images_lda(i,:) * w_lda,0,'r*');
else
plot(v_images_lda(i,:) * w_lda,0,'b.');
end
end
title('LDA 1D Plot');
ylim([-0.2 0.2]);
hold off
```
|
How to make 1-D plots in MATLAB?
|
CC BY-SA 3.0
| 0 |
2011-04-21T16:12:48.160
|
2016-02-16T19:51:25.830
|
2011-04-21T16:25:32.083
| 126,199 | 126,199 |
[
"matlab",
"plot"
] |
5,747,199 | 1 | 5,753,089 | null | 2 | 596 |
I have limited space for horizontal category navigation bar on top of my theme and I need to limit number of categories shown on this bar and tell WordPress put "More.." as a drop down menu link at the end of the list to let users hover their mouse cursors on that to see other categories as shown in screenshot.
How can I do that?

|
Show remaining wordpress categories in drop down menu
|
CC BY-SA 3.0
| null |
2011-04-21T16:47:51.120
|
2011-04-22T07:06:10.487
| null | null | 587,944 |
[
"wordpress",
"categories"
] |
5,747,333 | 1 | 5,747,389 | null | 7 | 597 |
Resharper tells me that MemberInfo.DeclaringType can never be null:

However when that code is run, the text "Top level member" is printed. I don't get it, what's wrong here?
|
strange Resharper warning on MemberInfo.DeclaringType
|
CC BY-SA 3.0
| 0 |
2011-04-21T17:02:32.410
|
2011-04-22T10:06:49.570
| null | null | 308,451 |
[
"c#",
"reflection",
"resharper",
"resharper-5.1"
] |
5,747,471 | 1 | null | null | 2 | 1,756 |
writing a system in netbeans rcp - not sure if this matters, i just don't trust the rcp
We're approaching crunch time on our system and the following error keeps happening (sometimes it happens after 10 minutes, sometimes it runs for 2 days and then happens which is leading me to believe it could be a threading error)
we have a socket reader class which implements runnable - here is a sample of the code
```
@Override
public void run() {
while (!Thread.interrupted()) {
try {
/*
* can't display actual code
* reads data through socket and passes stream to a new handler class
* which uses reflection to create new object based off socket stream
* (none of this happens in a separate thread)
* (we're not holding a reference to the handler class - a new one is
* -created every iteration)
*
* at some point during the creation of this object, we get a socket
* closed exception happening at SocketInputStream.socketRead()
*/
} catch (Exception ex) {
cleanup();
}
}
}
```
what i expect to happen is that the socket exception should just be caught by the catch block and the cleanup executed
what ends up happening instead is i get a visible stack trace (pops up in the netbeans uncaught exception window and displays in the console) for java.net.SocketException socket closed - i cannot post the stack trace due to customer requirements
what else is strange is that in the actual socket input handler class we have the following method (this is the method that the exception is actually being thrown from)
```
public Abstract________ new________(Class<? extends Abstract________> clazz,
DataInput input) {
...
try {
// reflection code here
} catch (Exception ex) {
LOG.error("...");
throw new RuntimeException(ex);
}
...
}
```
if i try manually throwing the java.net.SocketException after the catch block the exception reads java.lang.RuntimeException: java.net.SocketException exception: socket closed
yet the stack trace that we receive randomly simply says java.net.SocketException: socket closed
this is leading me to believe that in our socket stream handling class it's not even catching the exception to begin with.
Does anybody have any input as to why this may be happening???
also - i am very sorry that i can't post the actual code, i'm not trying to be cryptic
so far the one thing i'm wondering about - i am somewhat familiar with reflection but not to a great extent - when i manually throw an exception it always gets caught by the try catch block - if an exception is thrown from something in reflection is there any way it could break the try catch contract - i don't see why it would but i mean, i'm honestly not sure and grasping for straws at this point
i have received permission to post an edited stack trace

in the MessageReader class there is no separate thread - the newMessage method is where the exception is being caught, wrapped into a RuntimeException and thrown up - the ____Reader is the socket reader with the while loop
both methods do show up in the stack trace
not sure if this will help
|
java try catch block not working using reflection - have no idea why, also maybe a thread error
|
CC BY-SA 3.0
| null |
2011-04-21T17:14:04.580
|
2011-04-21T18:09:15.500
|
2011-04-21T17:36:34.353
| 713,888 | 713,888 |
[
"java",
"multithreading",
"exception",
"reflection",
"try-catch"
] |
5,747,606 | 1 | 5,751,109 | null | 1 | 2,567 |

In the above image, child is a ContentPresenter. Its Content is a ViewModel. However, its ContentTemplate is null.
In my XAML, I have a TabControl with the following structure:
```
<local:SuperTabControlEx DataContext="{Binding WorkSpaceListViewModel}"
x:Name="superTabControl1" CloseButtonVisibility="Visible" TabStyle="OneNote2007" ClipToBounds="False" ContentInnerBorderBrush="Red" FontSize="24" >
<local:SuperTabControlEx.ItemsSource>
<Binding Path="WorkSpaceViewModels" />
</local:SuperTabControlEx.ItemsSource>
<TabControl.Template>
<ControlTemplate
TargetType="TabControl">
<DockPanel>
<TabPanel
DockPanel.Dock="Top"
IsItemsHost="True" />
<Grid
DockPanel.Dock="Bottom"
x:Name="PART_ItemsHolder" />
</DockPanel>
<!-- no content presenter -->
</ControlTemplate>
</TabControl.Template>
<TabControl.Resources>
<DataTemplate DataType="{x:Type vm:WorkSpaceViewModel}">
....
```
WorkSpaceViewModels is an ObservableCollection of WorkSpaceViewModel. This code uses the code and technique from [Keeping the WPF Tab Control from destroying its children](http://eric.burke.name/dotnetmania/2009/04/26/22.09.28).
The correct DataTemplate - shown above in the TabControl.Resource - appears to be rendering my ViewModel for two Tabs.
However, my basic question is, how is my view getting hooked up to my WorkSpaceViewModel, yet, the ContentTemplate on the ContentPresenter is null? My requirement is to access a visual component from the ViewModel because a setting for the view is becoming unbound from its property in the ViewModel upon certain user actions, and I need to rebind it.
|
How do you navigate a complex Visual Tree in order to re-bind an existing element?
|
CC BY-SA 3.0
| null |
2011-04-21T17:24:59.370
|
2012-01-02T10:21:28.463
|
2012-01-02T10:21:28.463
| 620,360 | 243,272 |
[
"wpf",
"mvvm",
"tabcontrol",
"contentpresenter"
] |
5,747,638 | 1 | 5,747,699 | null | 1 | 2,599 |
I am in need of some way to show a Meter visually...
Something along the lines of this sort of meter:

not exact just something similar where I can set the text and the values ect.
Does anyone know of a jquery meter or something?
Thanks!
|
Jquery Meter, or something similar
|
CC BY-SA 3.0
| null |
2011-04-21T17:28:18.687
|
2011-04-22T06:57:10.100
|
2011-04-21T17:29:37.437
| 6,212 | 645,143 |
[
"jquery",
"asp.net-mvc"
] |
5,747,863 | 1 | 5,748,155 | null | 93 | 112,555 |
I need to show the popular red notification indicator with count such as the one shown below. Getting something that looks nice cross browser seems tricky. For example, different browsers seem to treat paddings differently, resulting in weird looking notifications.
What is the best cross-browser way of ensuring the notifications show up nicely? Not adverse to using javascript, but pure css is of course preferable

|
Easiest CSS for "red notification badge" with count
|
CC BY-SA 4.0
| 0 |
2011-04-21T17:51:29.117
|
2022-06-13T21:37:46.210
|
2022-03-11T13:03:06.420
| 8,910,547 | 180,663 |
[
"javascript",
"html",
"css",
"notifications",
"css-position"
] |
5,747,987 | 1 | 5,749,647 | null | 39 | 45,137 |
I'd like to change the endpoint address, but it's giving me defined values, I mean, only one value `"/"`. I tried writing there, but it did not work - it is not editable.
How can I change it?

|
SoapUI change endpoint address
|
CC BY-SA 3.0
| 0 |
2011-04-21T18:00:40.237
|
2018-02-07T19:06:49.520
|
2016-03-16T14:06:11.390
| 814,702 | 625,189 |
[
"soap",
"soapui"
] |
5,748,434 | 1 | 5,748,539 | null | 2 | 4,052 |
I recently upgraded to Excel 2010. I was working on a spreadsheet and wrote some code and went to save it and I get this box that pops up. I'm not sure what to do.

|
Trying to save a workbook that contains macros
|
CC BY-SA 3.0
| null |
2011-04-21T18:45:20.340
|
2011-04-21T18:58:52.030
| null | null | 640,015 |
[
"excel-2010"
] |
5,748,501 | 1 | 8,606,507 | null | 1 | 235 |
I'm using a slightly modified `ImageAndTextCell` from one of Apple's tutorials in a custom `NSOutlineView`. For those unfamiliar with it, it's an `NSTextFieldCell` subclass that draws an image to the left of the cell's text.
I have a Source List like iTunes's, with group rows, and items beneath. While editing the cell's value, the focus ring only draws partially for the group's first two rows (see below). The top third of the focus ring draws in the first row, and the bottom third draws in the second row.
Subsequent rows draw fine (see the third row below), and they all have the same image. What could be causing this?
  
I commented out virtually all custom code in `ImageAndTextCell` and it made no difference (Only `init`, `dealloc`, `copyWithZone`, and the `image` getter and setter remained).
I commented virtually all code in the `NSOutlineView` subclass, and my delegate class, as well as keeping all code from Update 1 commented out - still strange results. The third row is no longer always perfect, but the portions of the focus rect drawn shifted as I removed various functions.
Also, the items I'm having problems with are in the second of my two outline groups. When renaming the only item in the first group, the focus rect was perfect every step of the way. Ironically, this is the one that can't be renamed during standard operation of my app.
Next I'll take a look at all of my settings in the NIB and see if something might be broken there.
I was able to fix it by disabling Core Animation across the board for every view in my window. The question has now become: How do I re-enable Core Animation without making my focus rects look crappy?
|
Core Animation causing partial Source List focus ring
|
CC BY-SA 3.0
| null |
2011-04-21T18:54:07.393
|
2011-12-22T16:03:17.923
|
2011-04-21T22:33:57.733
| 105,717 | 105,717 |
[
"objective-c",
"macos",
"core-animation",
"nsoutlineview",
"nscell"
] |
5,748,967 | 1 | 5,751,589 | null | 1 | 139 |
I have a form that needs to be dynamic, allowing the user to add extra outcomes, w/ however many measures they need associated with it, as depicted here: [http://i.stack.imgur.com/EMcoa.png](https://i.stack.imgur.com/EMcoa.png)
Here is a sketch of the naming scheme: [http://i55.tinypic.com/2s6rh4y.png](http://i55.tinypic.com/2s6rh4y.png)

Below is the code in some form of working order:
[http://jsfiddle.net/bkmorse/yNZcD/2/](http://jsfiddle.net/bkmorse/yNZcD/2/)
What I am having a problem with is making the name of the outcome and measure fields correct.
I need the first outcome textarea to be named: `outcome[1]`. amd every extra outcome textarea should be `outcome[2], outcome[3]` and so on.
As for the measure textareas, I need them be named like this: `measure[1][0], measure[1][1], measure[1][2]` and so on.
The measure textarea's are named like that, because they will be ran thru a loop when inserted into the database, and the first index number will relate to the outcome.
So when the user adds more measure textareas, the index should increase, for example...
outcome[2], has measure textarea: `measure[2][0], measure[2][1]`, then when they click the plug sign, it will create a new measure textarea, named `measure[2][2]`.
Same thing goes for when clicking the plus sign next to outcome, so the next outcome textarea name would be `outcome[2]`, click for another outcome it would be `outcome[3]` and so on.
The code works, but I just need to have someone look at it and revise it so it has the name scheme I want.
|
need to fix html and values appending with javascript
|
CC BY-SA 3.0
| null |
2011-04-21T19:39:40.737
|
2011-04-22T15:13:58.027
|
2011-04-21T19:49:54.830
| 26,130 | 26,130 |
[
"javascript",
"jquery",
"html"
] |
5,748,989 | 1 | 5,756,528 | null | 0 | 1,344 |
I know this has been asked alot and in various ways, and I have tried them, but with no success. i am using netbeans and swing to create my GUI.
i have a Jlabel inside of a JPanel. Whenver I place the label inside the panel, it automatically anchors it to the closest component which is NOT what I want. I want to center the component, regardless of size.
However, creating custom JPanels in the "Code" section of the GUI editor to make a BoxLayout and GridBagLayout does not seem to work. It seems no matter what, it still anchors. You can see the attached jpg of what it is doing in my editor.
Anybody have some ideas?
As mentioned, I have tried to change the "Custom Creation Code" of the JPanel to do:
new javax.swing.JPanel(new GridBagLayout());
and then removed the parent tag of my JLabel and added "Post-Creation Code" to be:
statusPanel.add(versionLabel,new GridBagConstraints());
I have also tried typing out the GridBagConstraints to say centered.
|
Netbeans JLabel anchor overpowers my layout managers
|
CC BY-SA 3.0
| null |
2011-04-21T19:41:16.483
|
2011-04-22T14:38:45.403
| null | null | 541,070 |
[
"netbeans",
"jpanel",
"jlabel",
"gridbaglayout",
"boxlayout"
] |
5,749,070 | 1 | 5,749,099 | null | 0 | 39 |
Is there a way to narrow the select handles.
for instance

Narrowing down the actual handles on the right?
Thanks
|
Shrinking the Select Element Handle
|
CC BY-SA 3.0
| null |
2011-04-21T19:50:12.427
|
2011-04-21T19:52:46.220
| null | null | 291,051 |
[
"html",
"css",
"forms"
] |
5,749,181 | 1 | 5,760,634 | null | 5 | 2,450 |
It is possible in `ggplot2` to draw that second "axis" label correlating the percentage of values from X and Y.

I have a data.frame with two vars, both related and in percentage. I want to show the evolution of V1 related to V2; for example, how much percentage of V2 do i need to get 20% of V1 (and vice-versa).
```
V1 V2
0 0
0.03 0.0005
0.10 0.0015
0.13 0.0020
....
1 1
```
Now my problem is how can i do that inner axis on X and Y, showing the relation between X and Y percentages.
Also how can I set ggplot to use (0,0) as the intercept of the x and y axis?
|
ggplot2 - Axis Aesthetics
|
CC BY-SA 3.0
| 0 |
2011-04-21T19:59:48.907
|
2011-04-29T13:44:44.023
|
2011-04-29T13:44:44.023
| 168,747 | 713,560 |
[
"r",
"ggplot2"
] |
5,749,455 | 1 | 5,750,327 | null | 2 | 4,594 |
I am trying to customize my UIProgressView. I would like it to look like the third one down on the image:

Please can you tell me how I could acheive this.
|
Custom UIProgressView style
|
CC BY-SA 4.0
| 0 |
2011-04-21T20:29:42.180
|
2021-10-01T23:06:05.590
|
2021-10-01T23:06:05.590
| 1,265,393 | 556,479 |
[
"iphone",
"objective-c",
"xcode",
"progress",
"uiprogressview"
] |
5,749,532 | 1 | 5,808,006 | null | 3 | 1,861 |
I have a web application that uses ASP.NET with "InProc" session handling. Normally, everything works fine, but a few hundred requests each day take significantly longer to run than normal. In the IIS logs, I can see that these pages (which usually require 2-5 seconds to run) are running for 20+ seconds.
I enabled Failed Request Tracing in Verbose mode, and found that the delay is happening in the AspNetSessionData section. In the example shown below, there was a 39-second gap between AspNetSessionDataBegin and AspNetSessionDataEnd.
I'm not sure what to do next. I can't find any reason for this delay, and I can't find any more logging features that could be enabled to tell me what's happening here. Does anyone know why this is happening, or have any suggestions for additional steps I can take to find the problem?
My app usually stores 1-5MB in session for each user, mostly cached data for searches. The server has plenty of available memory, and only runs about 50 users.

|
Why is the AspNetSessionData stage of page processing delaying my page by 20+ seconds?
|
CC BY-SA 3.0
| 0 |
2011-04-21T20:38:06.653
|
2011-05-02T12:01:17.713
| null | null | 52,080 |
[
"asp.net",
"session",
"delay",
"slowdown",
"freb"
] |
5,749,571 | 1 | 5,754,522 | null | 4 | 4,941 |
How could I determine the visible map corner coordinate:
|
Determine the corners coordinate in Google maps V3
|
CC BY-SA 3.0
| 0 |
2011-04-21T20:41:58.163
|
2011-06-01T12:45:50.463
|
2011-04-22T10:31:46.273
| 187,606 | 611,116 |
[
"javascript",
"google-maps",
"google-maps-api-3"
] |
5,749,590 | 1 | 5,751,189 | null | 21 | 18,336 |
This seems so simple it's embarrassing. However, the first question is when passing a value from the new ViewBag in MVC 3.0 (Razor) into a JavaScript block, is this the correct way to do it? And more importantly, where and how do you apply the proper string replacement code to prevent a single quote from becoming ' as in the resultant alert below?
Adding this into a single script block:
```
alert('@ViewBag.str') // "Hi, how's it going?"
```
Results in the following alert:

|
Passing strings with Single Qoute from MVC Razor to JavaScript
|
CC BY-SA 3.0
| 0 |
2011-04-21T20:43:22.943
|
2021-01-28T19:06:28.950
|
2012-06-18T13:21:32.693
| 727,208 | 646,306 |
[
"javascript",
"asp.net-mvc",
"razor",
"viewbag"
] |
5,749,607 | 1 | 5,756,887 | null | 0 | 1,072 |
I have to create a form that presents a hierarchy of options to the user and I can't seem to get it correct.
So if I have the following parent child relationship (the level is the stage the item is shown):
> - - - - - - - - - - - - - - - - - - - -
These options are shown as radio buttons. All need to be hidden with the exception of those at Level 1 (option1 and option2.) The levels thow extra complexity into this as some options at one level pertain to another option at a higher level but not specifically the level a before.
When the user selects either Option1 or Option2 (they can only choose one per level) the next level of options show. For example, if the user selected option1 the Option3, Option4 and Option5 will show. If the user select Option2 after selecting Option1 the selections would reset and show Option6 to Option10.
Options19 and Option20 have no parent and are the last to show.
I amn currently doing the following and it is obviously not correct since I am asking this question.
```
@using (Html.BeginForm())
{
int prevLevel = 0;
foreach (var option in Model.Options)
{
//close previous Div if we are starting a new level and we are not at the start
if (option.LevelId != prevLevel && Model.Options.IndexOf(option) != 0)
{
@:</div>
@:<div class="option-section" id="Level@(option.LevelId)">
}
else if(Model.Options.IndexOf(option) == 0)//This should only occur at the start
{
@:<div class="option-section" id="Level@(option.LevelId)">
}
@Html.RadioButton("OptionIds[" + (option.LevelId - 1) + "]", option.OptionId, false, new { parent = option.ParentOptionId })
@option.OptionName
prevLevel = option.LevelId;
}
<div class="buttons">
<input type="submit" value="Continue" class="button" />
</div>
}
```
My output looks like this (from the actual html output):
Sorry couldn't get my code to show correctly in the editor.

|
Best way to present a hierarchy of options for selection in MVC Razor view
|
CC BY-SA 3.0
| null |
2011-04-21T20:44:41.440
|
2012-06-06T14:57:53.303
| null | null | 162,950 |
[
"asp.net-mvc",
"forms",
"razor"
] |
5,749,772 | 1 | null | null | 0 | 1,808 |
Either VS2008 or Source Safe messed up the file structure for a program I found on Source Safe. Currently the solution files are only located under Documents and Settings\mjones\MyDocuments\Visual Studio 2008\Projects\SeminarMailings\SeminarMailings\ and all the coding files are under COIN\Development\SeminarMailings\ and Documents and Settings\mjones\MyDocuments\Visual Studio 2008\Projects\SeminarMailings\SeminarMailings\Development\
Question:
How would I edit the solution file in such a way that it will still load if clean up the unecessary directories by putting all the solution files under COIN and the code files under COIN\SeminarMailings and deleting the rest of the folders (duplicate data).
Background:
Here's the current directory structure w/ the coding files in the right window pane:

Here are the files that I need references in the file's solution under VS2008.

Here's the code for the solution file:
```
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "SeminarMailings", "..\..\..\..\..\..\Development\SeminarMailings", "{2951C6A1-AF82-40C6-9DD8-93E35E5135F6}"
ProjectSection(WebsiteProperties) = preProject
SccProjectName = ""$/SeminarMailings.root/SeminarMailings", CKLAAAAA"
SccAuxPath = ""
SccLocalPath = "..\.."
SccProvider = "MSSCCI:Microsoft Visual SourceSafe"
TargetFramework = "3.5"
Debug.AspNetCompiler.VirtualPath = "/SeminarMailings"
Debug.AspNetCompiler.PhysicalPath = "..\..\..\..\..\..\Development\SeminarMailings\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\SeminarMailings\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/SeminarMailings"
Release.AspNetCompiler.PhysicalPath = "..\..\..\..\..\..\Development\SeminarMailings\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\SeminarMailings\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "4951"
DefaultWebSiteLanguage = "Visual C#"
EndProjectSection
EndProject
Global
GlobalSection(SourceCodeControl) = preSolution
SccNumberOfProjects = 2
SccProjectName0 = \u0022$/SeminarMailings.root/SeminarMailings\u0022,\u0020CKLAAAAA
SccLocalPath0 = ..\\..\\..\\..\\..\\..
SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
SccProjectFilePathRelativizedFromConnection0 = Documents\u0020and\u0020Settings\\mjones\\My\u0020Documents\\Visual\u0020Studio\u00202008\\Projects\\SeminarMailings\\
SccWebProject1 = true
SccProjectUniqueName1 = ..\\..\\..\\..\\..\\..\\Development\\SeminarMailings
SccLocalPath1 = ..\\..\\..\\..\\..\\..
SccProjectFilePathRelativizedFromConnection1 = Development\\SeminarMailings\\
SccProjectEnlistmentChoice1 = 2
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2951C6A1-AF82-40C6-9DD8-93E35E5135F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2951C6A1-AF82-40C6-9DD8-93E35E5135F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
```
Any suggestions would be welcomed!
Thanks for looking!
|
Visual Studio 2008 - Editing the Project Solution File to Fix the project's Directory Structure
|
CC BY-SA 3.0
| null |
2011-04-21T21:03:20.090
|
2011-04-29T13:05:50.573
|
2011-04-29T13:05:50.573
| 606,805 | 606,805 |
[
"visual-studio-2008",
"visual-sourcesafe",
"directory-structure"
] |
5,749,816 | 1 | 5,750,004 | null | 0 | 811 |
I am trying to build a screen like this:

I've already built the navigationItem (the "title Bar") and the table view, now I'm looking for a way to add the buttons under the table view.
The result should look similar to a tab bar, but as the buttons are used to influence the the number of displayed records in the table, I'm only dealing with one controller.
How do I achieve what I'm looking for?
|
How to display buttons under a TableView at the bottom of a screen?
|
CC BY-SA 3.0
| null |
2011-04-21T21:09:09.077
|
2011-04-21T21:49:29.663
| null | null | 25,320 |
[
"iphone",
"uitableview"
] |
5,750,063 | 1 | 5,750,123 | null | 0 | 51 |
I have this name/value pairs:

As you've already noticed, name and state's values are both of them aligned on right side but address' value starts on new row.
like the rest values (yeah, it's longer, but it should start on the same row with and continue on the next one)?
Style of address:
```
<div class="prop">
<span class="name">Address</span>
<span class="value">Women and Gynae Oncology Centre Mount Elizabeth Medical Centre Mount Elizabeth #17-14</span>
</div>
```
CSS for name class:
```
.name {
vertical-align: top;
font-weight: bold;
width: 115px;
float: left;
padding: 5px;
margin-top: 3px;
clear: left;
}
```
CSS for value class:
```
.value {
float: left;
padding: 5px;
}
```
Do you have any ideas?
Thanks.
After some refinements from the answer, it looks better:

|
How can I align this longer span with the rest?
|
CC BY-SA 3.0
| null |
2011-04-21T21:38:45.117
|
2011-04-21T22:20:39.020
|
2011-04-21T22:12:26.473
| 174,349 | 174,349 |
[
"html",
"css"
] |
5,750,107 | 1 | 5,751,284 | null | 2 | 2,221 |
I'm working on a custom module in Drupal with a multi-page form approach, and I'd like to have a visualization of steps.
Step 1 > [_Step_2_] > Step 3 > Finish
Business Rules:
- - -
Q1 :
What's the best/ most Drupal-correct or Drupal-intuitive way to implement this?
I looked around a little and found this : 
Q2 : Is this a good option ?
It looks like they are using the hook_menu system here ( MENU_LOCAL_TASK ) - how would I prevent the user from skipping ahead to steps?
|
The "Drupal way" to Wizard Steps?
|
CC BY-SA 3.0
| null |
2011-04-21T21:43:47.233
|
2011-04-22T00:47:46.940
| null | null | 449,902 |
[
"drupal",
"drupal-modules",
"wizard"
] |
5,750,323 | 1 | 5,753,177 | null | 6 | 6,067 |
I don't want to use foreign key association to CompanyType (member that will hold the foreign key id) but prefer to use navigation property. So I removed the CompanyTypeId.
I get this exception that relates the relationship between entity Company and CompanyType:
> Error 5: The element 'Principal' in
namespace
'[http://schemas.microsoft.com/ado/2008/09/edm](http://schemas.microsoft.com/ado/2008/09/edm)'
has incomplete content. List of
possible elements expected:
'PropertyRef' in namespace
'[http://schemas.microsoft.com/ado/2008/09/edm](http://schemas.microsoft.com/ado/2008/09/edm)'.

How can I remove those id's from the POCOs without getting the exception?
|
remove foreign key property cause an exception
|
CC BY-SA 3.0
| 0 |
2011-04-21T22:12:17.397
|
2011-04-26T20:40:57.697
|
2011-04-22T07:17:41.510
| 413,501 | 289,246 |
[
"c#",
".net",
"entity-framework",
"mapping",
"entity-relationship"
] |
5,750,459 | 1 | 6,044,563 | null | 4 | 2,538 |

the following code produces the graph above:
```
digraph G {
//---graph config
fontname=Helvetica
rankdir = RL
splines = polyline
compound = true
//concentrate = true
labeljust = c
labelloc = t
ranksep=0.5
nodesep=0.5
//size="10,10"
ratio=compress
edge [
minlen=1
arrowsize=0.75
labeldistance=5
fontname=Helvetica
fontsize=12
fontcolor=black
labelfontsize=12
labelfontcolor=red
labelfontname=Helvetica
]
node [
fontname=Helvetica
fontsize=12
fontcolor=black
regular=true
shape=diamond
// width=0.25
// height=0.25
]
// --- # nodes
{// records
node [shape=record, width=1]
b10 [label=" { R-7 | 5 } | B/10 "]
b20 [label=" { R-6 | 10 } | B/20 "]
b30 [label=" { R-5 | 10 } | B/30 "]
d10 [label=" { R-10 | 15 } | D/10 "]
d20 [label=" { R-9 | 10 } | D/20 "]
d30 [label=" { R-8 | 10 } | D/30 "]
a20 [label=" { R-2 | 5 } | A/20 "]
a30 [label=" { R-1 | 10 } | A/30 "]
}
{// circles
node [shape=circle]
e [label="E"]
c [label="C"]
}
{// box
node [shape=box]
a [label="A"]
}
//--- # edges
{
edge [weight = 1000]
//straight
c -> b10 -> b20 -> b30
e -> d10 -> d20 -> d30
a20 -> a30 -> a
//combination
{b30 d30} -> a20
}
//--- # Clusters
// subgraph cluster_1{
// label="a "
// e d10 d20
// }
// subgraph cluster_2{
// label="b "
// c b10 b20 b30
// }
// subgraph cluster_3{
// label="c "
// a30 a20
// }
// --- # bugfixes
{// c before e
edge [style=invis]
c -> e
{rank=source e c} // force same rank before other nodes
}
}
```
This is exactly as nice and clean as I want it to be.
However, I want to be able to mark and comment certain sections of the structure and I thouht clusters should be the right means to do that.
If you uncomment the CLUSTERS section of the code you get the following code and respective graph:
```
digraph G {
//---graph config
fontname=Helvetica
rankdir = RL
splines = polyline
compound = true
//concentrate = true
labeljust = c
labelloc = t
ranksep=0.5
nodesep=0.5
//size="10,10"
ratio=compress
edge [
minlen=1
arrowsize=0.75
labeldistance=5
fontname=Helvetica
fontsize=12
fontcolor=black
labelfontsize=12
labelfontcolor=red
labelfontname=Helvetica
]
node [
fontname=Helvetica
fontsize=12
fontcolor=black
regular=true
shape=diamond
// width=0.25
// height=0.25
]
// --- # nodes
{// records
node [shape=record, width=1]
b10 [label=" { R-7 | 5 } | B/10 "]
b20 [label=" { R-6 | 10 } | B/20 "]
b30 [label=" { R-5 | 10 } | B/30 "]
d10 [label=" { R-10 | 15 } | D/10 "]
d20 [label=" { R-9 | 10 } | D/20 "]
d30 [label=" { R-8 | 10 } | D/30 "]
a20 [label=" { R-2 | 5 } | A/20 "]
a30 [label=" { R-1 | 10 } | A/30 "]
}
{// circles
node [shape=circle]
e [label="E"]
c [label="C"]
}
{// box
node [shape=box]
a [label="A"]
}
//--- # edges
{
edge [weight = 1000]
//straight
c -> b10 -> b20 -> b30
e -> d10 -> d20 -> d30
a20 -> a30 -> a
//combination
{b30 d30} -> a20
}
//--- # Clusters
subgraph cluster_1{
label="a "
e d10 d20
}
subgraph cluster_2{
label="b "
c b10 b20 b30
}
subgraph cluster_3{
label="c "
a30 a20
}
// --- # bugfixes
{// c before e
edge [style=invis]
c -> e
{rank=source e c} // force same rank before other nodes
}
}
```

As you can see from the bugfixes section at the end of the code I want nodes C and E definitely to appear with the same rank 'above' all other nodes.
Furhtermore, I want the upper and lower sequence of records to be connected with nice straight lines like in the first example. The weight of the edges that I introduced does not help.
Does anyone know how to fix this problem and how to make graphviz produce a nice clean graph as in example #1 with just 3 embracing boxes and respective labels added?
|
graphviz: how to prevent clusters from overrinding rank=source statement
|
CC BY-SA 3.0
| 0 |
2011-04-21T22:28:41.403
|
2012-07-02T17:13:52.763
|
2012-07-02T17:13:52.763
| 97,160 | 522,315 |
[
"graph",
"graphviz",
"rank"
] |
5,750,578 | 1 | 5,767,786 | null | 1 | 106 |
I've got another issue. My method:
```
public StudentProfile GetFullStudentProfile(int userID)
{
SqlConnection conn = new SqlConnection(Config.DbConnectionString);
SqlCommand cmd = new SqlCommand("GetFullUserProfile", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int));
cmd.Parameters["@UserID"].Value = userID;
StudentProfile sp = null;
try
{
conn.Open();
SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow);
if (reader.Read())
{
sp = new StudentProfile((int)reader["UserID"], (string)reader["UserName"], (string)reader["UserFamilyName"], (DateTime)reader["UserBirthDay"], (string)reader["UserTelephone"], (string)reader["UserEmail"], (DateTime)reader["UserRegDate"], (string)reader["UserComment"], (bool)reader["UserActive"]);
}
reader.Close();
}
catch (Exception ex)
{
//lbl.Text = ex.Message;
}
finally
{
conn.Close();
}
return sp;
}
```
Code in WebUserControl:
```
protected void ddlStudents_SelectedIndexChanged(object sender, EventArgs e)
{
CatalogAccess ca=new CatalogAccess();
lblEmail.Visible = true;
lblName.Visible = true;
lblTelephone.Visible = true;
HiddenID.Value = ddlStudents.SelectedValue;
lblName.Text = HiddenID.Value;
lblEmail.Text = ca.GetFullStudentProfile(ddlStudents.SelectedIndex).UserEmail;
lblFamilyName.Visible = true;
lblBirth.Visible = true;
ddlStudents.Items.Clear();
PopulateStudentsDDL();
}
```
When I run the code I am getting exception

Do I understand right that the problem is in method GetFullStudentProfile()? If it's so, how can it be fixed?
I think the problem is:
```
StudentProfile sp = null;
```
So it says that variable sp was not filled with data in try block. Is it?
Now adding the StudentProfile.cs class listing:
```
public class StudentProfile
```
{
public StudentProfile(int userID, string userName, string userFamilyName, DateTime userBirthDay, string userTelephone, string userEmail,DateTime userRegDate,string userComment,bool userActive)
{
UserID = userID;
UserName = userName;
UserFamilyName = userFamilyName;
UserBirthDay = userBirthDay;
UserTelephone = userTelephone;
UserEmail = userEmail;
UserRegdate = userRegDate;
UserComment = userComment;
UserActive = userActive;
}
```
public int UserID
{
get;
set;
}
public string UserName
{
get;
set;
}
public string UserFamilyName
{
get;
set;
}
public DateTime UserBirthDay
{
get;
set;
}
public string UserTelephone
{
get;
set;
}
public string UserEmail
{
get;
set;
}
public DateTime UserRegdate
{
get;
set;
}
public string UserComment
{
get;
set;
}
public bool UserActive
{
get;
set;
}
```
}
|
Issue with method
|
CC BY-SA 3.0
| null |
2011-04-21T22:44:44.550
|
2011-04-24T08:35:45.863
|
2011-04-23T13:52:04.987
| 715,999 | 715,999 |
[
"asp.net",
"c#-4.0"
] |
5,750,948 | 1 | 5,751,005 | null | 0 | 60 |
```
<?php
if($sth1->rowCount() > 0) {
$row = $sth1->fetch(PDO::FETCH_ASSOC);
echo "<div> <h2>{$row1['prefix']} {$row1['code']}</h2></div>";
} else {
echo "No results.";
}
unset($sth1);
?>
<?php
$username = "###";
$password = "####";
$pdo1 = new PDO('mysql:host=####;dbname=####', $username, $password);
$pdo1->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$sth1 = $pdo1->prepare('SELECT pID, lname, fname FROM Professor ORDER BY pID DESC LIMIT 10;;');
$sth1->execute(array());
?>
```
Result: Just a blank page, no error.

|
Why isnt this pulling anything? Php/mysql
|
CC BY-SA 3.0
| null |
2011-04-21T23:42:55.900
|
2011-04-21T23:57:42.143
| null | null | 700,070 |
[
"php",
"mysql"
] |
5,751,052 | 1 | 5,751,315 | null | 4 | 30,744 |
This is the link that I'm current teaching myself Scheme, [http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-1.html](http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-1.html)
According to the author,

Then I tried a minimal example
```
(define (check-p x)
(if (>= x 0)
(display 1)))
```
, and DrScheme gave me errors:
```
if: bad syntax (must have an "else" expression) in: (if (>= x 0) (display 1))
```
If I put an extra statement within the `if` statement, then it works. But I don't get it, why do we need an extra statement there? The code statement above made sense to me. If the number is greater than 0, display a 1, otherwise do nothing. Any idea?
Thanks,
|
How does `if` statement work in Scheme?
|
CC BY-SA 3.0
| 0 |
2011-04-21T23:58:58.467
|
2013-08-31T18:39:12.080
| null | null | 398,398 |
[
"scheme"
] |
5,751,199 | 1 | 5,751,843 | null | 0 | 155 |
I'm trying to retreive some OAuth information that I've stored using Datastore, but I'm getting this error when I'm instantiating my OAuthConsumer class:
```
TypeError: __init__() got an unexpected keyword argument 'consumer_secret'
```
This is also my first time experimenting with Namespace, and I'm wondering if that has something to do with it. The class is as follows:
```
creds = OAuthConsumer('google')
class OAuthConsumer(db.Model):
'''the oauth consumer information'''
consumer_key = db.StringProperty()
consumer_secret = db.StringProperty()
def __init__(self, service):
namespace_manager.set_namespace(service)
query = db.GqlQuery('SELECT * FROM OAuthConsumer')
creds = query.get()
self.consumer_key = creds.consumer_key
self.consumer_secret = creds.consumer_secret
```
Here's what I've got using Data Viewer:

Any ideas as to what I'm doing wrong?
|
TypeError when using GAE Datastore and namespaces - can't retrieve entity
|
CC BY-SA 3.0
| 0 |
2011-04-22T00:30:03.273
|
2011-04-22T02:52:20.640
| null | null | 492,976 |
[
"python",
"google-app-engine",
"namespaces"
] |
5,751,278 | 1 | 5,756,001 | null | 12 | 3,369 |
In Xcode 4, if you + click on a keyword, then the said keyword will appear in a popover with a bunch of descriptive information, like so:

However, when I + click on my own method or variable, all I get is a link to the file in which the object was declared:

(I've noticed in some of the framework headers, that there is some sort of special comment syntax. Could that be related?)
|
How do you populate the Xcode 4 "Option+Click" popover?
|
CC BY-SA 3.0
| 0 |
2011-04-22T00:47:06.690
|
2013-10-08T20:52:23.163
| null | null | 224,988 |
[
"xcode4"
] |
5,751,512 | 1 | 5,751,593 | null | 1 | 261 |
I am try to create a website that has a menu with a little bar under it showing where you are. And when you click one of the bars in looks like the content is scrolling left and the new content is coming from the right! How could I achieve this with jquery or something else?

|
Scroll Effect JQuery
|
CC BY-SA 3.0
| null |
2011-04-22T01:36:25.373
|
2011-04-22T02:00:18.970
| null | null | 631,526 |
[
"jquery",
"html"
] |
5,751,678 | 1 | null | null | 16 | 17,163 |
I've been messing with VS 2010 debugging settings, trying to get stepping into the .NET Framework working. Well, I can't get it to work. I've also tried the Reflector VS plugin and that was working at one point.
Then I randomly started getting this error:

This happens when I have a breakpoint on a line that calls `IEnumerable<T>.ToList()`. If I try to step-over or step-into on that line where my breakpoint is set, I get this error dialog and my debugging session ends.
If I move the breakpoint to the line below, the debugger makes it past the `ToList()` call!
I've tried the following to no avail:
- - - -
What is going on?
|
"The debugger cannot continue running the process."
|
CC BY-SA 3.0
| null |
2011-04-22T02:18:21.013
|
2019-06-12T10:58:09.433
| null | null | 374,198 |
[
"c#",
"visual-studio",
"visual-studio-2010",
"debugging"
] |
5,751,672 | 1 | 5,770,355 | null | 0 | 457 |
I'm trying to make a CFFI wrapper for BWAPI (which was written on C++ ) from [http://code.google.com/p/bwapi/](http://code.google.com/p/bwapi/) ,by modifying another BWAPI-bridge (which was written on C#) [http://code.google.com/p/bwapi-mono-bridge/](http://code.google.com/p/bwapi-mono-bridge/).
My OS: Window 7 Professional
SWIG version: 2.0.3
UAC : off
(*Here come the error code if I don't specify the /std folder in the %include part: [http://pastebin.com/XkePbKjG](http://pastebin.com/XkePbKjG) )
- Update: The same error on Linux :
- On window with SWIG 2.0.3

Here is the content of my `BuildInterface.bat` which was modified from the original :
```
:start
erase /s /q Classes\*.*
erase /s /q Wrapper\*.*
swig.exe -cffi -c++ -I..\BWAPI\Include -outdir Classes\BWAPI -o Wrapper\bwapi-bridge.cxx Interfaces\bwapi-bridge.i
swig.exe -cffi -c++ -I..\BWAPI\Include -outdir Classes\BWTA -o Wrapper\bwta-bridge.cxx Interfaces\bwta-bridge.i
swig.exe -cffi -c++ -I..\BWAPI\Include -outdir Classes\BWAPIC -o Wrapper\bwapiclient-bridge.cxx Interfaces\bwapiclient-bridge.i
pause
goto start
```
And the modified `bwapi-bridge.i` :
```
%include "cpointer.i"
%include "carrays.i"
//include headers in our generated code.
%module bwapi
%{
#include "BWAPI.h"
using namespace BWAPI;
%}
//special include for our dllimport attribute
%include "dllimport.i"
//resolve ambiguities
%include "ambiguities.i"
//unimplemented functions in headers (or ones that should not be called)
//uncomment these each new version of BWAPI to ensure they are not later implemented.
#%ignore getPlayerUnits;
#%ignore BWAPI::GameData::GameData;
//fix up operator overrides.
%rename (opAssign) *::operator =;
%rename (opEquals) *::operator ==;
%rename (opLessThan) *::operator <;
%rename (opGreaterThan) *::operator >;
%rename (opMinus) *::operator -;
%rename (opNotEquals) *::operator !=;
%rename (opPlus) *::operator +;
%rename (opAdd) *::operator +=;
%rename (opSubtract) *::operator -=;
//fix up const strings.
%apply const string & { string &};
%include "BWAPI.h"
%include "BWAPI/EventType.h"
%include "BWAPI/GameType.h"
%include "BWAPI/Race.h"
%include "BWAPI/TechType.h"
%include "BWAPI/UpgradeType.h"
%include "BWAPI/Position.h"
%include "BWAPI/AIModule.h"
%include "BWAPI/Color.h"
%include "BWAPI/Constants.h"
%include "BWAPI/CoordinateType.h"
%include "BWAPI/DamageType.h"
%include "BWAPI/Error.h"
%include "BWAPI/ExplosionType.h"
%include "BWAPI/Flag.h"
%include "BWAPI/Force.h"
%include "BWAPI/Input.h"
%include "BWAPI/Event.h"
%include "BWAPI/Latency.h"
%include "BWAPI/Order.h"
%include "BWAPI/PlayerType.h"
%include "BWAPI/Player.h"
%include "BWAPI/BulletType.h"
%include "BWAPI/Bullet.h"
%include "BWAPI/TilePosition.h"
%include "BWAPI/UnitCommandType.h"
%include "BWAPI/UnitCommand.h"
%include "BWAPI/Game.h"
%include "BWAPI/Unit.h"
%include "BWAPI/UnitSizeType.h"
%include "BWAPI/UnitType.h"
%include "BWAPI/WeaponType.h"
%include "std/std_vector.i"
%include "std/std_set.i"
%include "std/std_pair.i"
%include "std/std_list.i"
%include "std/std_map.i"
//Instantiate our templates
namespace std {
%template (PositionVector)vector<BWAPI::Position>;
%template (BulletPtrSet) set<BWAPI::Bullet *>;
%template (BulletTypeSet) set<BWAPI::BulletType>;
%template (DamageTypeSet) set<BWAPI::DamageType>;
%template (ErrorSet) set<BWAPI::Error>;
%template (ExplosionTypeSet) set<BWAPI::ExplosionType>;
%template (ForcePtrSet) set<BWAPI::Force *>;
%template (GameTypeSet) set<BWAPI::GameType>;
%template (OrderSet) set<BWAPI::Order>;
%template (PlayerPtrSet) set<BWAPI::Player *>;
%template (PlayerTypeSet) set<BWAPI::PlayerType>;
%template (RaceSet) set<BWAPI::Race>;
%template (TechTypeSet) set<BWAPI::TechType>;
%template (TilePositionSet) set<BWAPI::TilePosition>;
%template (UnitPtrSet) set<BWAPI::Unit*>;
%template (UnitCommandTypeSet) set<BWAPI::UnitCommandType>;
%template (UnitSizeTypeSet) set<BWAPI::UnitSizeType>;
%template (UnitTypeSet) set<BWAPI::UnitType>;
%template (UpgradeTypeSet) set<BWAPI::UpgradeType>;
%template (WeaponTypeSet) set<BWAPI::WeaponType>;
%template (EventList) list<BWAPI::Event>;
%template (UnitTypeList) list<BWAPI::UnitType>;
%template (TilePositionDoubleMap) map<BWAPI::TilePosition, double>;
%template (UnitTypeIntMap) map<BWAPI::UnitType, int>;
%template (PositionPair) pair<BWAPI::Position,BWAPI::Position>;
%template (TilePositionDoublePair) pair<BWAPI::TilePosition, double>;
%template (UnitTypeIntPair) pair<BWAPI::UnitType,int>;
%template (TilePositionVector) vector<BWAPI::TilePosition>;
%template (PositionSet) set<BWAPI::Position>;
};
```
Along with modified `bwta-bridge.i` :
```
%include "cpointer.i"
%module bwta
%{
#include "BWAPI.h"
#include "BWTA.h"
using namespace BWTA;
%}
//use getcolumn instead
%ignore operator[];
//import BWAPI
%import "bwapi-bridge.i"
//BWTA order of includes is important to stop SWIGTYPE_p etc class generation with and without namespace
%include "BWTA/RectangleArray.h"
%include "BWTA/BaseLocation.h"
%include "BWTA/Chokepoint.h"
%include "BWTA/Polygon.h"
%include "BWTA/Region.h"
%include "BWTA.h"
%module bwta-bridge
%include "std/std_vector.i"
%include "std/std_set.i"
%include "std/std_pair.i"
//Instantiate our templates
%template (RectangleArrayDouble) BWTA::RectangleArray<double>;
namespace std {
%template (BaseLocationPtrSet) set<BWTA::BaseLocation *>;
%template (RegionPtrSet) set<BWTA::Region *>;
%template (ChokepointPtrSet) set<BWTA::Chokepoint *>;
%template (PolygonPtrSet) set<BWTA::Polygon *>;
%template (PolygonVector) vector<BWTA::Polygon>;
%template (RegionPtrRegionPtrPair) pair<BWTA::Region *, BWTA::Region *>;
}
;
```
You can download the original src code from the 2 pages I listed above with any svn client.
Thank you.
Please Help !
|
Error on making CFFI wrapper for BWAPI library (C++) by SWIG
|
CC BY-SA 3.0
| null |
2011-04-22T02:17:15.687
|
2013-04-17T11:09:33.340
|
2011-04-22T06:59:14.623
| 449,250 | 449,250 |
[
"c++",
"common-lisp",
"wrapper",
"swig"
] |
5,751,941 | 1 | 5,752,062 | null | 1 | 172 |
Here is a picture of my data model:

I have a view where the user can enter a number for weight & reps. How can I use NSFetchedResultsController (or a better option) to save this as an instance of "Set".
Then I want the user to be able to make multiple "Set" for a particular "Exercise". The user might choose to do 5 different "Exercise". I want the total of exercises to be as 1 "Session".
And "Session" will be stored with a timestamp. That way I can search and bring up data from today, or within 30 days, etc.
|
How To Achieve This Using Core Data
|
CC BY-SA 3.0
| null |
2011-04-22T03:16:19.313
|
2011-04-22T03:40:22.397
| null | null | null |
[
"iphone",
"objective-c",
"core-data"
] |
5,752,070 | 1 | 5,756,091 | null | 4 | 5,075 |
I have done some changes to my project and now I am getting above message when running the app and don't how how to debug it.
I have read [here](http://lists.apple.com/archives/cocoa-dev/2009/Jun/msg00015.html) that I have to put a break point in `-[NSCFDictionary setObject:forKey:]` and set a condition as well.
But, how do I set the condition they mentioned? (Stop only when value is nil) I am on Xcode4 and only get this window when trying to set a breakpoint.
Currently it stops at every `-[NSCFDictionary setObject:forKey:]` which is not very helpful since it will stop even in correct calls and Apple's internal calls as well (too many!)

|
Debugging -[NSCFDictionary setObject:forKey:]: attempt to insert nil value
|
CC BY-SA 3.0
| 0 |
2011-04-22T03:42:27.633
|
2011-08-31T19:30:07.150
| null | null | 149,008 |
[
"iphone",
"objective-c",
"cocoa",
"macos"
] |
5,752,087 | 1 | 5,758,535 | null | 1 | 5,082 |
I want to be able to access a certain node in my Doubly Linked List in O(1) time. I know that if i traverse the list to find a certain node it would take O(n) time so I want to map the nodes to an array list where I can access the nodes in O(1) time.
I'm really unsure how I would do this mapping. I would like to see an example of how this can be done.
Edit:
I would like to be able to access any node in the linked list so I can move the nodes around in O(1) time.
Example: Move node with ID 5 to end of list in O(1) time.
Edit 2: I uploaded a picture example of what I'm trying to accomplish

|
Arraylist mapping to linkedlist nodes
|
CC BY-SA 3.0
| null |
2011-04-22T03:46:27.743
|
2011-04-23T12:10:33.303
|
2011-04-23T07:57:08.647
| 321,908 | 321,908 |
[
"java",
"arraylist",
"linked-list"
] |
5,752,112 | 1 | 5,752,280 | null | 0 | 3,204 |
My desired output is:

My de facto output has too much blank space:

The code is:
```
<div id="tabarea"><ul id="tabnav"><li class="tab_all"><strong>All</strong></li><li class="tab_private"><a title="Display only info from privates" href="?t=&f=p" >Private<span class="tab_right_links"></span></a></li><li class="tab_company"><a title="Show only info from companies" href="?t=&f=c" >Company<span class="tab_right_links"></span></a></li></ul></div><table><tr><td><table class="listingWithImages" border="0px"><tr><td>4 hours, 3 minutes</td><td><img src="http://localhost:8080/_ah/img/8oUwXdeweiQmEq_ESy33RQ===s100"></td><td><a href="/servead/105">Test2</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYaQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 14 minutes</td><td><img src="http://localhost:8080/_ah/img/HmoH2SsmUcoPOKiJZM-gVw===s100"></td><td><a href="/servead/102">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYZgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 15 minutes</td><td><img src="http://localhost:8080/_ah/img/zrBsUrSO6T_g48xvf_3GDQ===s100"></td><td><a href="/servead/100">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYZAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 16 minutes</td><td><img src="http://localhost:8080/_ah/img/mTQP6dGy9OJqChqujxL6PA===s100"></td><td><a href="/servead/98">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYYgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 17 minutes</td><td><img src="http://localhost:8080/_ah/img/KVMHyBo32fWE_ruH8a7zjQ===s100"></td><td><a href="/servead/96">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYYAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 19 minutes</td><td></td><td><a href="/94/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYXgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 hours, 22 minutes</td><td><img src="/images/93.png" alt="Test"/></td><td><a href="/90/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYWgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 15 hours</td><td></td><td><a href="/72/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYSAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/68/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYRAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/67/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYQww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>4 days, 22 hours</td><td></td><td><a href="/64/test">Test</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYQAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 17 hours</td><td></td><td><a href="/63/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYPww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 18 hours</td><td></td><td><a href="/57/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYOQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 20 hours</td><td></td><td><a href="/52/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYNAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 21 hours</td><td><img src="http://localhost:8080/_ah/img/hFT-PUQJfOX1jh_P5Zl80A===s100"></td><td><a href="/servead/50">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYMgw" style="margin:0; padding:0 display:inline"></span></td><td></td></tr><tr><td>5 days, 22 hours</td><td><img src="http://localhost:8080/_ah/img/SnoEEZiYDBbWNauTqvKhTg===s100"></td><td><a href="/servead/46">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYLgw" style="margin:0; padding:0 display:inline"></span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/42/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYKgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/40/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYKAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/39/frankwin-international-educatoin-and-immigration">Frankwin International, Educatoin and Immigration</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYJww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>5 days, 22 hours</td><td></td><td><a href="/36/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYJAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 2 hours</td><td></td><td><a href="/34/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYIgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/33/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYIQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/29/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYHQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/28/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYHAw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>6 days, 3 hours</td><td></td><td><a href="/25/computer-services">Computer services</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYGQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/22/test">Test</a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYFgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/21/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYFQw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week</td><td></td><td><a href="/18/"></a><br/></td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYEgw" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr><tr><td>1 week, 6 days</td><td><img src="/images/6.png" alt="Computer ..."/></td><td><a href="/3/computer-services">Computer services</a><br/>
EUR 220
</td><td><span id="ahFjbGFzc2lmaWVkc21hcmtldHIICxICQWQYAww" style="margin:0; padding:0 display:inline">Sweden</span></td><td></td></tr></table></td><td><script type="text/javascript"><!--
google_ad_client = "ca-pub-7211665888260307";
/* rektanglar i lista */
google_ad_slot = "7024728308";
google_ad_width = 336;
google_ad_height = 280;
//--></script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br><script type="text/javascript"><!--
google_ad_client = "ca-pub-7211665888260307";
/* rektanglar i lista */
google_ad_slot = "7024728308";
google_ad_width = 336;
google_ad_height = 280;
//--></script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></td></tr></table></div>
```
Can you see how I should do to reduce to blank space I get? Thank you
EDIT: Inserting a `<br>` into the code at a place makes the gap smaller:

I think that the gap of the first `<tr>` level above shouldn't be there.
I've uploaded the code to a hosting: [www.montao.com.br/li](http://www.montao.com.br/li)
|
How to reduce blank space in html?
|
CC BY-SA 3.0
| null |
2011-04-22T03:50:12.710
|
2017-11-21T17:06:09.793
|
2017-11-21T17:06:09.793
| 4,370,109 | 108,207 |
[
"html",
"css",
"html-table",
"adsense"
] |
5,752,408 | 1 | 5,752,715 | null | 8 | 11,183 |
My question is basically the same as [this one](https://stackoverflow.com/questions/1535826/resize-borderless-window-on-bottom-right-corner), but applied to the Qt C++ framework.
I am implementing a popup window by inheriting QWidget with flags Qt::QPopup | Qt::QWindow. I would like this window to be moveable and resizeable, I'm currently achieving this by using the mouse events in the following code:
```
void TextPopup::mousePressEvent(QMouseEvent* event)
{
offset = event->pos();
QWidget::mousePressEvent(event);
}
void TextPopup::mouseMoveEvent(QMouseEvent* event)
{
if(event->buttons() & Qt::LeftButton)
if(resizeMode) {
QPoint p = mapToGlobal(event->pos()) - geometry().topLeft();
resize(p.x(), p.y());
} else
move(mapToParent(event->pos() - offset));
else {
QPoint diff = geometry().bottomRight() - mapToGlobal(event->pos());
if(diff.x() <= 6 && diff.y() <= 6) {
if(!resizeMode) {
setCursor(Qt::SizeFDiagCursor);
resizeMode = true;
}
} else {
if(resizeMode) {
setCursor(Qt::SizeAllCursor);
resizeMode = false;
}
}
}
}
void TextPopup::mouseReleaseEvent(QMouseEvent* event)
{
offset = QPoint();
QWidget::mouseReleaseEvent(event);
}
```
I have a few problems with this. For one, I'm guessing there's a better way to do it. And more importantly, I would like the resize symbol at the bottom right as in this image] (taken from the post mentioned above). Any suggestions for achieving this?

|
Qt: Resize borderless widget
|
CC BY-SA 4.0
| 0 |
2011-04-22T04:55:58.633
|
2019-05-23T19:21:56.490
|
2019-05-23T19:21:56.490
| 6,296,561 | 683,436 |
[
"c++",
"qt",
"resize",
"widget",
"borderless"
] |
5,752,704 | 1 | 5,752,716 | null | 5 | 2,944 |
I've never seen these before, but what are the little 'A's and 'M's next to the filenames in the file browser for?

|
What do these icons in Xcode 4 stand for?
|
CC BY-SA 3.0
| 0 |
2011-04-22T06:03:03.610
|
2013-12-05T10:13:09.717
| null | null | 307,881 |
[
"xcode4"
] |
5,752,794 | 1 | 5,752,861 | null | 0 | 2,047 |
I am trying to create a window in GTK+ that has tab looks like this:

Whenever the user clicks in the "New" button, there is a new tab appear.
However, when I was compiling my program I got an
```
phongcao@phongcao:~$ g++ /home/phongcao/C++/GTK+/newtab.cc -o /home/phongcao/C++/GTK+/newtab `pkg-config gtk+-2.0 --cflags --libs`
/home/phongcao/C++/GTK+/newtab.cc: In function ‘int main(int, char**)’:
/home/phongcao/C++/GTK+/newtab.cc:51:3: error: void value not ignored as it ought to be
```
```
#include <gtk/gtk.h>
void destroy(GtkWidget *window, gpointer data) {
gtk_main_quit();
}
void new_tab(GtkNotebook *notebook, GtkWidget *content, GtkWidget *hbox) {
gtk_notebook_append_page(notebook, content, hbox);
}
int main(int argc, char *argv[])
{
GtkWidget *window, *label, *content;
GtkWidget *button, *hbox, *notebook;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
gtk_window_set_title(GTK_WINDOW(window), "New Tab");
gtk_widget_set_size_request(window, 300, 200);
notebook = gtk_notebook_new();
button = gtk_button_new_with_label("New");
label = gtk_label_new("Tab");
hbox = gtk_hbox_new(FALSE, 5);
content = gtk_label_new("This is a tab");
gint a = 0;
gtk_box_pack_start_defaults(GTK_BOX(hbox), label);
gtk_box_pack_start_defaults(GTK_BOX(hbox), button);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), content, hbox);
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_TOP);
//This following line is where the error is from:
g_signal_connect(G_OBJECT(button), "new_tab", G_CALLBACK(new_tab(GTK_NOTEBOOK(notebook), content, hbox)), NULL);
g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(destroy), NULL);
gtk_container_add(GTK_CONTAINER(window), notebook);
gtk_widget_show_all(hbox);
gtk_widget_show_all(window);
gtk_main();
return 0;
}
```
|
error: void value not ignored as it ought to be - C/GTK+
|
CC BY-SA 3.0
| null |
2011-04-22T06:20:21.377
|
2011-04-22T06:48:41.530
|
2011-04-22T06:38:57.710
| 656,037 | 656,037 |
[
"c++",
"c",
"gtk",
"gtkmm"
] |
5,753,186 | 1 | null | null | 0 | 617 |

how to apply a effect like the photo below to image by using CSS or something else?
thanks!
|
CSS Effect like safari new tab
|
CC BY-SA 3.0
| null |
2011-04-22T07:22:36.753
|
2011-05-05T20:44:20.460
| null | null | 294,339 |
[
"html",
"css"
] |
5,753,351 | 1 | 5,753,448 | null | 28 | 94,713 |
How to make a double line border in CSS, each line in a different color without using `background-image`?
For example like this:

Code:
```
<h2> heading 2 </h2>
<p> paragraph text </p>
<h2> heading 2 </h2>
<p> paragraph text </p>
```
|
How to make double lines border in CSS, each line in different color, without using background image?
|
CC BY-SA 3.0
| 0 |
2011-04-22T07:44:23.623
|
2016-09-01T14:31:53.153
|
2012-05-11T14:01:35.530
| 225,037 | 84,201 |
[
"css"
] |
5,753,442 | 1 | 5,753,447 | null | 0 | 645 |
The application of image-preview has troubles in IE9,like the picture,

this method can't work well and throw an error,but in ie6-8,it works well.
I want to get the true filepath from the fileinput ,not the path like "C:\fakepath*.*",my browser is ie9.
Help me.
|
How can I get the local filepath from the fileinput using javascript in IE9?
|
CC BY-SA 3.0
| null |
2011-04-22T07:57:59.743
|
2011-04-22T07:59:05.613
|
2011-04-22T07:59:05.613
| 187,606 | 620,746 |
[
"javascript",
"html",
"internet-explorer-9"
] |
5,753,444 | 1 | 5,753,488 | null | 0 | 2,025 |
I want to draw a form where there will be some textarea, on the textarea there will be a little image [the image's size will be smaller than the size of the textarea], and clicking on the image will call a function fx()
Can anyone code this for me in JavaScript/jquery/CSS ?

In this image the GO is an image, clicking on it will call Fx()
i tried with it and failed (and dont know how to attach a function on the image)
```
.searchform {
display: inline-block;
padding: 3px 5px;
}
.searchform input {
font: normal 12px/100% Arial, Helvetica, sans-serif;
}
.searchform .searchfield {
background: #fff;
padding: 6px 6px 6px 8px;
width: 202px;
border: solid 1px #bcbbbb;
outline: none;
}
.searchform .searchbutton {
color: #fff;
border: solid 1px #494949;
font-size: 11px;
height: 27px;
width: 27px;
}
<form class="searchform">
<input id="t" class="searchfield" value="Search..." type="text">
<input class="searchbutton" value="Go" type="button">
</form>
```
|
Image on a textarea - JS/CSS
|
CC BY-SA 3.0
| null |
2011-04-22T07:58:31.560
|
2011-04-22T09:21:59.200
|
2011-04-22T08:08:28.790
| 683,233 | 683,233 |
[
"javascript",
"jquery",
"css"
] |
5,753,508 | 1 | 5,754,329 | null | 12 | 11,262 |
This is related to Simon's [question on changing default ColorData](https://mathematica.stackexchange.com/q/4712/121) in Mathematica. While the solutions all addressed the issue of changing `ColorData` in line plots, I didn't quite find the discussion helpful in changing the `ColorFunction`/`ColorData` in `ContourPlot`/`ArrayPlot`/`Plot3D`, etc.
> Is there a way to get mma to use custom colors in ArrayPlot/ContourPlot/etc.
---
Consider the following example plot of the function `sin(x^2+y^3)` that I created in MATLAB:

Now doing the same in mma as:
```
xMax = 3; yMax = 3;
img = Transpose@
Table[Sin[y ^3 + x^2], {x, -xMax, xMax, 0.01}, {y, -yMax, yMax,
0.01}];
plot = ArrayPlot[img, ColorFunction -> ColorData["Rainbow"],
AspectRatio -> 1,
FrameTicks -> {FindDivisions[{0, (img // Dimensions // First) - 1},
4], FindDivisions[{0, (img // Dimensions // Last) - 1}, 4],
None, None},
DataReversed ->
True] /. (FrameTicks -> {x_,
y_}) :> (FrameTicks -> {x /. {a_?NumericQ, b_Integer} :> {a,
2 xMax (b/((img // Dimensions // First) - 1) - 1/2)},
y /. {a_?NumericQ, b_Integer} :> {a,
2 yMax (b/((img // Dimensions // Last) - 1) - 1/2)}})
```
I get the following plot:

I prefer the rich, bright colors in MATLAB to mma's pastel/dull colors. How do I get mma to use these colors, if I have the RGB values of the colormap from MATLAB?
You can download the RGB values of the default colormap in MATLAB, and import it into mma as
```
cMap = Transpose@Import["path-to-colorMapJet.mat", {"HDF5",
"Datasets", "cMap"}];
```
`cMap` is a `64x3` array of values between `0` and `1`.
Just to give you some background, here's some relevant text from the MathWorks [documentation on colormap](http://www.mathworks.com/help/techdoc/ref/colormap.html)
> A colormap is an m-by-3 matrix of real
numbers between 0.0 and 1.0. Each row
is an RGB vector that defines one
color. The kth row of the colormap
defines the kth color, where map(k,:)
= [r(k) g(k) b(k)]) specifies the intensity of red, green, and blue.
Here `map=cMap`, and `m=64`.
I tried poking at `ColorDataFunction`, and I see that the `ColorData` format is similar to the `colormap`. However, I'm not sure how to get `ArrayPlot` to use it (and presumably it ought to be the same for other plot functions).
---
Also, since my exercise here is purely to reach a level of comfort in mma, similar to what I have in MATLAB, I'd appreciate comments and suggestions on improving my code. Specifically, I'm not too satisfied with my hack of a way to "fix" the `FrameTicks`... surely there must be a nicer/easier way to do it.
|
Custom ColorFunction/ColorData in ArrayPlot (and similar functions)
|
CC BY-SA 4.0
| 0 |
2011-04-22T08:08:14.313
|
2019-06-05T18:48:33.370
|
2019-06-05T18:48:33.370
| 6,296,561 | null |
[
"wolfram-mathematica"
] |
5,753,626 | 1 | 7,355,243 | null | 2 | 1,206 |
I have my program that paint the backcolor of a combobox column in a datagridview.
I win xp everything works fine, but in win 7 the comboboxes have the gray color:

if you look the shot, you see that the combobox columns are grayed, but they must be yellow like the other columns.
if I use the old windows theme the grid is ok, but I wish use the new themes of win 7.
(i'm the developer, so I can change the code to paint the cell)
|
win 7 can't paint combobox
|
CC BY-SA 3.0
| null |
2011-04-22T08:26:07.020
|
2011-09-08T22:26:54.213
| null | null | 349,045 |
[
"c#",
"datagridview",
"combobox",
"backcolor"
] |
5,753,717 | 1 | 5,753,749 | null | 1 | 563 |
I am developing an application for Mac OS X. In this application, I need to implement "smart notification window". What I mean by this term.
Here some screenshots:


In the app I develop, such "smart notification" will be appear under system bar icon.
If you work on a Mac you might notice a similar windows.

Does anybody has some code tutorial or examples of such "windows" draw.
Working in XCode, Cocoa Environment.
|
Smart Notification Window under Mac OS X
|
CC BY-SA 3.0
| 0 |
2011-04-22T08:37:35.063
|
2012-05-19T09:40:03.800
|
2012-05-19T09:40:03.800
| 1,028,709 | 720,278 |
[
"cocoa",
"xcode",
"macos"
] |
5,753,810 | 1 | 5,754,324 | null | 0 | 316 |
I created tabbar template app. I changed from UIViewController to UINavigationController in the MainWindow.xib. Then I added "next screen" button. When user taps on this button I will push a new view controller. But how can I do this?

|
I want to create UITabBar controller + UINavigationBar. I have some problems
|
CC BY-SA 3.0
| null |
2011-04-22T08:49:06.067
|
2011-04-22T10:00:55.087
| null | null | 499,825 |
[
"iphone",
"uinavigationcontroller",
"uitabbarcontroller",
"uinavigationbar"
] |
5,753,842 | 1 | 5,769,665 | null | 7 | 1,427 |
I have a supervised learning problem where my algorithm will be given a set of training examples for learning whether a shape is a circle of square. I was wondering which type of ANN would be the best. I know that you can choose a perceptron if the data is linearly separable.. Surely I can easily have a hyperplane that divides my squares and circles up? So isn't a perceptron a good enough choice? However, aren't multilayer feed forward networks more commonly used? What is the natural choice and why?
The following image shows the training data given to the system. The NN needs to classify two dimensional data A=[a1,a2] into squares and circles.

Thank you.
|
Choosing the correct type of neural network
|
CC BY-SA 3.0
| 0 |
2011-04-22T08:52:23.030
|
2011-04-24T09:11:12.697
|
2011-04-22T10:32:55.040
| 478,513 | 478,513 |
[
"artificial-intelligence",
"machine-learning",
"neural-network"
] |
5,753,880 | 1 | 5,757,610 | null | 2 | 1,054 |
I came up with this twitter project in flash, and once i was done and tried to put it online i ran into a sandbox error. From what i've read it looks like i just need to setup a php proxy file. Which I get and understand. All the tutorials i've been able to find were for simple urls with no GET data being passed in the URL. For my project the GET data is dynamic so i can't just put a set url in the php proxy and i dont understand php well enough to figure out how to get the get data into the proxy url..
so here's what i know how to edit in Flex:

heres a full example api call i would need to make:
```
http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=brybam&?page=1
```
and here is a php proxy script that was reccomended online:
```
<?php
$post_data = $HTTP_RAW_POST_DATA;
$header[] = "Content-type: text/xml";
$header[] = "Content-length: ".strlen($post_data);
$ch = curl_init( $_GET['url'] );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
if ( strlen($post_data)>0 ){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
}
$response = curl_exec($ch);
$response_headers = curl_getinfo($ch);
if (curl_errno($ch)) {
print curl_error($ch);
} else {
curl_close($ch);
header( 'Content-type: ' . $response_headers['content-type']);
print $response;
}
?>
```
Alright so getting started I just need to make the php script into a file something like twitter.php and just put it on my domain. Then I'm assuming in the URL box for the http service setup in Flex put and reenter it as something like this:
```
http://mydomain.com/twitter.php?screen_name=brybam&?page=1
```
SO what im asking is because my understanding of php is very limited, how exactly would I take the above script and make it capable of being passed
```
http://mydomain.com/twitter.php?screen_name=brybam&?page=1
```
with Flex and be able to take different potential arguments?
I think it may be something like
```
$page = $_GET['page'];
$screen_name = $_GET['screen_name'];
```
in the php file, but im not sure where i should be placing the variables into to make them part of the URL
im sure this is cake if you know php and it would be awesome if someone could help me out with this, thanks!
EDIT:
I tried this, but got an error (the error is posted under what i tried)
```
<?php
$page = $_GET['page'];
$screen_name = $_GET['screen_name'];
$url = $_GET['url'];
$post_data = $HTTP_RAW_POST_DATA;
$header[] = "Content-type: text/xml";
$header[] = "Content-length: ".strlen($post_data);
$ch = curl_init("'url'?screen_name='$screen_name'&?page='$page'");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
if ( strlen($post_data)>0 ){
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
}
$response = curl_exec($ch);
$response_headers = curl_getinfo($ch);
if (curl_errno($ch)) {
print curl_error($ch);
} else {
curl_close($ch);
header( 'Content-type: ' . $response_headers['content-type']);
print $response;
}
?>
```
error msg:
```
The response is not a valid XML or a JSON string.
Error on line 1 of document : The element type "meta" must be terminated by the matching end-tag "". Nested exception: The element type "meta" must be terminated by the matching end-tag "".
```
|
php proxy for flash twitter api call (with dynamic get array)
|
CC BY-SA 3.0
| null |
2011-04-22T08:58:11.640
|
2012-01-09T23:47:54.233
|
2011-04-22T09:55:15.653
| 393,373 | 393,373 |
[
"php",
"apache-flex",
"twitter",
"proxy",
"get"
] |
5,754,097 | 1 | null | null | 3 | 956 |
This was actually a question asked to me during a recent interview and I was clean bowled.
The question was to design a database to represent a file system where -
- -
- -
- There has to be one database table for the model. Not mandatory, but good to have as the Interview question had this condition.
I did not know that making a tree and numbering it as shown in the following diagram makes it so much more optimized -

The useful property of the above tree structure is that -
-
Then if we store the info in a database structure like this -
```
_______________________________________________________________________
Sequence_Number Name type
-----------------------------------------------------------------------
0 Parent Directory Dir
1 dir1 Dir
2 file1 File
3 file2 File
4 file3 File
5 dir2 Dir
...
________________________________________________________________________
```
- The above structure is what I remember during the discussion. This may not be the best structure to solve the problem. Please let me know if some change is needed.
The first query will be like this -
```
Select Name From File_System
where Sequence_Number Between Next_Subtree_First_Node
and Previous_Subtree_Last_Node
and type = "File";
```
-
E.g. for file4,
Next_Subtree_First_Node = 7 and
Previous_Subtree_Last_Node = 4.
-
E.g. given file7, the result should be -
Parent Directory / dir3 / dir4 / file7.
|
How to find the absolute path of a node (file or directory) in this file system model
|
CC BY-SA 3.0
| 0 |
2011-04-22T09:29:09.853
|
2011-04-25T11:14:34.487
|
2011-04-25T11:14:34.487
| 351,903 | 351,903 |
[
"database-design",
"filesystems",
"modeling",
"absolute-path"
] |
5,754,128 | 1 | 5,754,468 | null | 1 | 924 |
I have a Tab Based App. When I am in a UIWebView, I want the TabBar to hide and be replaced with a UIToolBar.
Right now I utilize the following:
```
-(void)viewWillAppear:(BOOL)animated
{
[self.tabBarController.tabBar setHidden:YES];
self.navigationController.toolbarHidden = NO;
}
```
What this results in is the TabBar hiding the space it took is just blank white, and the toolbar is displayed above this blank white space. How can I fix this?

|
How To Replace UITabBar With UIToolBar?
|
CC BY-SA 3.0
| 0 |
2011-04-22T09:31:41.733
|
2011-04-22T11:29:59.100
| null | null | null |
[
"iphone",
"objective-c",
"cocoa-touch"
] |
5,754,206 | 1 | 5,775,429 | null | 2 | 2,295 |
I have a gridview in which I display file names getting from Database. I have made the file name as a link button in my gridview.
```
<asp:GridView ID="gdvMainList" runat="server" CssClass="Grid"
AutoGenerateColumns="False" DataSourceID="dtsFilesUploaded"
AllowPaging="True" DataKeyNames="Id" SkinID="PagedGridView" AllowSorting="True"
onrowediting="gdvMainList_RowEditing" OnRowDataBound="gdvMainList_RowDataBound" onrowupdating="gdvMainList_RowUpdating" onrowcommand="gdvMainList_RowCommand">
<Columns>
<asp:TemplateField HeaderText="File Name" SortExpression="FileName">
<ItemTemplate>
<asp:LinkButton ID="lbFileName" runat="server" Text='<%# Bind("FileName") %>' OnClick="OpenFile" CausesValidation="false"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Uploaded On" SortExpression="CreatedDateTime">
<ItemTemplate>
<asp:Label ID="lblCreatedDate" runat="server" Text='<%# Bind("CreatedDateTime") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Category" SortExpression="glCategoryId">
<ItemTemplate>
<asp:Label ID="lblglCategoryId" runat="server" Text='<%# Bind("GeneralLookup.LookupItem") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="ddlglCategoryId" runat="server" CssClass="textEntry2" DataSourceID="dtsglCategoryId" DataTextField="LookupItem" DataValueField="Id" AppendDataBoundItems="true" Width="120px">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:BoundField DataField="CreatedBy" HeaderText="Created By" Visible="false" />
</Columns>
</asp:GridView>
```
The link button has a method Onclick="OpenFile" and the code of Open file is:
```
protected void OpenFile(object sender, EventArgs e)
{
LinkButton btn = (LinkButton)sender;
string fileName = btn.Attributes["FileName"].ToString();
//string path = Server.MapPath(".") + "\\Files\\" + fileName;
string path = Server.MapPath("~") + "Upload\\" + this.fileUpload.FileName;
if (File.Exists(path))
{
Response.AppendHeader("content-disposition", "filename=" + fileName);
string type = "Application/word";
if (type != "")
Response.ContentType = type;
Response.WriteFile(path);
Response.End();
}
else
{
}
}
```
Now the problem is, this code does not work in update panel and works very fine without update panel. That's why I am trying to add these lines to make a post back.
```
<Triggers>
<asp:PostBackTrigger ControlID="btnFileUploadSave" />
<asp:PostBackTrigger ControlID="lbFileName" />
```
Control Id btnFileUploadSave is another image button in my file that is being used to upload file. Because upload file was also not possible in update panel without this.
Anyway when I run this code, the following exception occurs:
```
Server Error in '/' Application.
```
A control with ID 'lbFileName' could not be found for the trigger in UpdatePanel 'upAttachFile'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: A control with ID 'btnOpenFile' could not be found for the trigger in UpdatePanel 'upAttachFile'.
Please help if anyone can. I have wasted a lotttttttttttttt of my time on this.
Here is the GUI of my aspx page:

|
Postback triggers problem
|
CC BY-SA 3.0
| null |
2011-04-22T09:40:59.967
|
2011-04-25T12:14:55.047
|
2011-04-25T12:14:55.047
| 275,404 | 669,448 |
[
"asp.net",
"gridview",
"triggers",
"updatepanel",
"postback"
] |
5,754,439 | 1 | 5,768,541 | null | 40 | 81,906 |
How to make bevel and Embosed effect to button in CSS 3 ?
Like this.

Enlarged Image
I'm only considering based browsers. and
```
<input type="submit" value="Submit your entry" class="input" />
```
|
How to make bevel and Embosed effect to button in CSS 3 for web-kit based browsers?
|
CC BY-SA 3.0
| 0 |
2011-04-22T10:16:29.093
|
2017-08-09T21:39:49.517
|
2011-04-22T10:22:19.083
| 84,201 | 84,201 |
[
"css",
"mobile-webkit"
] |
5,754,448 | 1 | null | null | 3 | 465 |
There is a user and two databases on server (db1 and db2).
User can connect to server having default database db1 where he can exec sp.
In sp syntax we use synonyms for db2 tables under dbo scheme.
All that is done in order to allow user just connect and exec one stored procedure. It worked noraml but now `The server principal "user" is not able to access the database "db2" under the current security context`.
User gets output from sp when code does not touch synonyms to db2.
What should be updated? I cant grant select to user for db2 objects.

|
security context problem when accessing through synonyms
|
CC BY-SA 3.0
| 0 |
2011-04-22T10:17:42.670
|
2022-06-29T18:05:42.093
|
2011-04-22T10:44:10.737
| 698,082 | 698,082 |
[
"sql-server",
"rights"
] |
5,754,534 | 1 | 5,754,588 | null | -2 | 100 |
I have some HTML retrieved from a database so I have no control over it and it looks different than if I just put it inside a div :


And here is my CSS:
```
#cvDiv {
position:absolute;
top:40px;
left: 300px;
border: none;
width: 720px;
display:inline;
background-color:White;
text-align:justify;
padding:15px;
box-shadow: 10px 10px 5px #888;
-moz-box-shadow: 0px 0px 5px 5px #888;
-webkit-box-shadow: 0px 0px 5px 5px #888;
z-index:auto;
}
```
and here is the HTML:
[http://jsfiddle.net/ug96v/](http://jsfiddle.net/ug96v/)
What am I doing wrong?
And what I want to do is a make the the top picture look like the bottom one.
This ended up being a DOCTYPE problem.
|
Why does CSS looks different
|
CC BY-SA 3.0
| null |
2011-04-22T10:31:40.953
|
2014-10-18T17:56:07.683
|
2014-10-18T17:56:07.683
| 1,145,804 | 689,777 |
[
"html",
"css"
] |
5,754,934 | 1 | null | null | 25 | 38,298 |
the `=` statement with the `LIKE` one for the integers
by eg. are the following the same thing:
```
select * from FOOS where FOOID like 2
// and
select * from FOOS where FOOID = 2
```
I'd prefer to use `LIKE` instead of `=` because I could use `%` when I have no filter for FOOID...
SQL Server 2005.

|
LIKE with integers, in SQL
|
CC BY-SA 3.0
| 0 |
2011-04-22T11:26:22.933
|
2015-04-30T17:07:17.940
|
2011-12-24T20:07:06.043
| 73,226 | 185,593 |
[
"sql",
"sql-server",
"sql-server-2005",
"sql-like"
] |
5,755,066 | 1 | 5,755,096 | null | 4 | 4,759 |
I'm trying to set it up so people can email from within my application. I'm referencing this post to do this, but I'm getting these warnings on the build:

and then when I run it, it bugs:

I'm wondering if I've simply placed the code in the wrong area. Just so you know I have placed
```
#import <MessageUI/MessageUI.h>
```
in the header file.
Thanks for the help!
---
It seems as if the problem lies within how my ViewController is setup. In fact all my UI code is in a separate object as shown below. This is making it difficult for me to understand which code goes where. Any advice?

|
Problems using MFMailComposeViewController
|
CC BY-SA 3.0
| 0 |
2011-04-22T11:43:49.580
|
2013-12-09T08:47:13.803
|
2011-04-22T20:06:36.687
| null | 385,559 |
[
"iphone",
"objective-c",
"cocoa-touch",
"xcode",
"email"
] |
5,755,079 | 1 | 5,760,741 | null | 1 | 651 |
We create the database using the schemaExport class of nHibernate. I now have an class with attributes from which we generated the nhibernate mapping. A part of this class is:
```
public class PluginInstance
{
...
[Bag(2, Name = "RouteParams", Access = "property", Table = "CMS_PluginInstanceRouteParams")]
[Key(3, Column = "ParamId")]
[Element(4, Column = "Param", Type = "string")]
public virtual IList<String> RouteParams
{
get { return _routeParamsField; }
set { _routeParamsField = value; }
}
...
}
```
The generated part of the nHibernate mapping is the following
```
<bag name="RouteParams" access="property" table="CMS_PluginInstanceRouteParams">
<key column="ParamId" />
<element column="Param" type="string" />
</bag>
```
For this property is correcty the "CMS_PluginInstanceRouteParams" table created when we call:
```
var schemaExport = new SchemaExport(configuration);
schemaExport.Create(false, true);
```
But I was wondering why this table does not have an primary key. The generated structure is 
The column ParamId is correctly an foreign key to the table of the class PluginInstance and in the column Param are correctly the values of the property RouteParams stored.
Is there no need for an primary key on this table? Is it possible to set the primary key on this property using the NHibernate.Mapping.Attributes?
|
Why is NHibernate creating a table without primary key?
|
CC BY-SA 3.0
| 0 |
2011-04-22T11:46:18.017
|
2011-04-24T18:31:29.633
| null | null | 418,514 |
[
".net",
"nhibernate",
"nhibernate-mapping",
"bag"
] |
5,755,107 | 1 | 5,755,207 | null | 5 | 19,740 |
I'm trying to add RichFaces to JSF 2.0 application, but I get this:
`The requested resource () is not available.`
That's from Console:
```
java.lang.ClassNotFoundException: org.ajax4jsf.Filter
```
My web.xml:
```
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>RichFaces4Test</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<!-- Plugging the "Blue Sky" skin into the project -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<!-- Making the RichFaces skin spread to standard HTML controls -->
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<!-- Defining and mapping the RichFaces filter -->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
</web-app>
```
My lib dir:

|
Using RichFaces 4 in a JSF 2.0 application
|
CC BY-SA 3.0
| null |
2011-04-22T11:50:10.577
|
2013-09-17T17:12:56.657
|
2011-04-22T12:21:10.590
| 109,880 | 383,087 |
[
"java",
"jsf",
"richfaces"
] |
5,755,170 | 1 | null | null | 2 | 658 |
I'd like to create a `JPanel` in java with a layout similar to the one below. Any ideas?

|
Which layoutmanager to use?
|
CC BY-SA 3.0
| null |
2011-04-22T12:00:40.677
|
2015-02-27T17:18:17.140
|
2011-04-22T12:04:43.750
| 513,838 | 720,491 |
[
"java",
"swing",
"layout",
"layout-manager"
] |
5,755,307 | 1 | 5,863,377 | null | 4 | 1,767 |
I have started android development just a month back, so still a newbie. My problem is that my AVD sometimes starts with different icon sizes in the emulator, i.e. the different apps' icons sometimes appear bigger/smaller. Same goes with the text size. This applies to all the applications in the AVD app list(including standard ones like gallery for example), and also the start screen text size. Basically it's system wide and it happens completely randomly(at random AVD launches)!
So help me out. Is there something to do with emulator starting parameters?
Almost forgot - using windows 7 32-bit, eclipse, and SDK 2.3.3
First three images for normal size



The images for bigger size below
 

|
AVD launches with different text and icon sizes
|
CC BY-SA 3.0
| null |
2011-04-22T12:16:45.167
|
2011-05-06T13:30:15.003
|
2011-05-06T10:40:22.000
| 720,508 | 720,508 |
[
"android",
"android-emulator",
"android-virtual-device"
] |
5,755,385 | 1 | 5,755,433 | null | 0 | 354 |
I want to create a agenda, where you just have to login into CMS and edit.
If you enter an new event (day,month,year,hour,activity,location,street,nr,postcode,city) it should create a new part in the database.
On the other hand @ the webpage, a frame needs to be created with all the info in it automatically

You see the red frame. If ill create as an admin on the CMS control page and create a new event, a new red frame comes on top of the existing one,
if the "standard frame" is full the oldest red frame gets hided, bij clicking on some arrows (If Possible) it shows the oldest dates.
I want to know how to start, and i understand PHP but have no knowledge of it.
Thanks
|
Creating a CMS agenda
|
CC BY-SA 3.0
| null |
2011-04-22T12:29:15.347
|
2011-04-22T12:34:04.980
| null | null | 574,711 |
[
"php",
"mysql",
"html",
"content-management-system"
] |
5,755,461 | 1 | 5,930,694 | null | 0 | 297 |
As I have generated HTML Table (Asp.net Table),
now I need the value of the Cell One when that respective checkBox is checked.
Suppose the second check box is clicked I need the value of the second row
E.g. if month 2 is clicked I need the value 553.5000
USING JAVA SCRIPT.
As well as the total of the same..
Total of the check value..

```
<table border="2" id="ctl00_ctl00_B_A_ucStudentRegistration1_TblTotalPay">
<tbody><tr>
<td class="caption">Total Amount</td><td class="caption">Paid Fees</td>
</tr><tr style="border-width: 3px; border-style: solid;">
<td>5889.2400</td><td><span disabled="disabled"><input type="checkbox" onclick="javascript:toggleCheckBoxes(this);" disabled="disabled" checked="checked" name="ctl00$ctl00$B$A$ucStudentRegistration1$chkMonth1" id="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth1"><label for="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth1">Month1</label></span></td>
</tr><tr>
<td>553.5000</td><td><input type="checkbox" onclick="javascript:toggleCheckBoxes(this);" name="ctl00$ctl00$B$A$ucStudentRegistration1$chkMonth2" id="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth2"><label for="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth2">Month2</label></td>
</tr><tr>
<td>885.6000</td><td><input type="checkbox" onclick="javascript:toggleCheckBoxes(this);" name="ctl00$ctl00$B$A$ucStudentRegistration1$chkMonth3" id="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth3"><label for="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth3">Month3</label></td>
</tr><tr>
<td>553.5000</td><td><input type="checkbox" onclick="javascript:toggleCheckBoxes(this);" name="ctl00$ctl00$B$A$ucStudentRegistration1$chkMonth4" id="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth4"><label for="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth4">Month4</label></td>
</tr><tr>
<td>553.5000</td><td><input type="checkbox" onclick="javascript:toggleCheckBoxes(this);" name="ctl00$ctl00$B$A$ucStudentRegistration1$chkMonth5" id="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth5"><label for="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth5">Month5</label></td>
</tr><tr>
<td>553.5000</td><td><input type="checkbox" onclick="javascript:toggleCheckBoxes(this);" name="ctl00$ctl00$B$A$ucStudentRegistration1$chkMonth6" id="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth6"><label for="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth6">Month6</label></td>
</tr><tr>
<td>553.5000</td><td><input type="checkbox" onclick="javascript:toggleCheckBoxes(this);" name="ctl00$ctl00$B$A$ucStudentRegistration1$chkMonth7" id="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth7"><label for="ctl00_ctl00_B_A_ucStudentRegistration1_chkMonth7">Month7</label></td>
</tr>
</tbody></table>
```
|
Get respective value which is checked by chk Box in HTML Table
|
CC BY-SA 4.0
| null |
2011-04-22T12:37:18.540
|
2021-09-05T10:15:44.933
|
2021-09-05T10:15:44.933
| 4,370,109 | 2,683,759 |
[
"javascript",
"html",
"asp.net",
"html-table",
"dom-events"
] |
5,755,549 | 1 | null | null | 1 | 113 |
I don't whats wrong but I'm trying to put an image as a background to a link, but the image is placed outside the link?! I use this code in the CSS:
```
a.route-bg {
background: url(../bilder/bilder_ikoner/route1.png) no-repeat left top;
display: block;
height: 45px;
width: 300px;
}
<div class="box-info">
<h4>Vilken väg väljer du?</h4>
<p>
Ta på dig favoritskorna och kombinera motion med upplevelse och upptäck Köpenhamn till fots utifrån guidens vägförslag.
</p>
<a class="route-bg" href="?p=karta&rutt=1">
<p class="route-links">1. City - Örestad - Sluseholmen - City<br />
Sträcka ca 00 km<br />
</p>
</a>
</div>
```

|
Problem with background in link?
|
CC BY-SA 3.0
| null |
2011-04-22T12:47:35.550
|
2011-04-22T20:17:19.380
|
2011-04-22T13:20:51.807
| 637,364 | 637,364 |
[
"css"
] |
5,755,635 | 1 | null | null | 4 | 4,416 |
I have a problem with encoding. When I get site's source code I have:

I set encoding to UTF8 like this:
```
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
string sourceCode = reader.ReadToEnd();
```
Thanks for your help!
|
HttpWebResponse - Encoding problem
|
CC BY-SA 3.0
| 0 |
2011-04-22T12:57:38.737
|
2022-10-11T10:28:05.180
| null | null | 358,840 |
[
"c#",
"encoding"
] |
5,755,765 | 1 | 5,756,862 | null | 6 | 11,295 |
For a personal project, I'm tyring to make a timer application (for controlling Poker blind schedules). I know there are several solutions already on the market, but for reasons which are too lengthy to go into here, we need a bespoke system. Although the output template of the system will ultimately be definable by the end user, we would like to include a widget which shows a circle that gets animated as the time counts down. Here's an illustration of a working example, showing the yellow circle and what we'd like to achieve (or something similar, anyway):

My question is, how would one code the animation as shown below using either jQuery or raw HTML5 / CSS3 animations? This is for a web application using jQuery, so there are no other library options I can use.
Advanced thanks!
|
Using jQuery / HTML5 to animate a circle
|
CC BY-SA 3.0
| 0 |
2011-04-22T13:11:48.340
|
2011-06-07T09:54:45.000
| null | null | 367,401 |
[
"javascript",
"jquery",
"html",
"animation",
"css"
] |
5,755,795 | 1 | 6,927,728 | null | 1 | 783 |
I have implemented my navigation controller and UITable View without using a NIB so far. Is it possible to add a toolbar into my UITable View (in navigation controller) using the NIB at this point of time?

I tried to drag a toolbar to the View Window in the NIB and also hooked it up with an IBOutlet, however, nothing is displayed when I compile and run the code.
Any advice on this is greatly appreciated.
Zhen
|
Objective C: How to add toolbar in NIB when Navigation controller was implemented using code
|
CC BY-SA 3.0
| null |
2011-04-22T13:14:10.323
|
2011-08-03T14:03:55.213
| null | null | 683,898 |
[
"objective-c",
"interface-builder",
"uitoolbar"
] |
5,755,921 | 1 | 5,757,563 | null | 0 | 3,554 |
I'm trying to setup the ability to email from within my application. My app is based on the SpeakHere example project which uses an object to run all it's UI:

This has made it very confusing for me as to how I need to set up MFMailComposeViewControllerDelegate, etc.
This is somewhat an extension of [my previous question](https://stackoverflow.com/questions/5755066/problems-using-mfmailcomposeviewcontroller).
Any help?
|
Implementing the MFMailComposeViewControllerDelegate and add it to your viewcontroller
|
CC BY-SA 3.0
| 0 |
2011-04-22T13:31:35.213
|
2016-10-20T07:50:39.680
|
2017-05-23T12:33:25.230
| -1 | 385,559 |
[
"iphone",
"objective-c",
"cocoa-touch",
"email"
] |
5,756,122 | 1 | 5,756,242 | null | 1 | 721 |
Good day gurus!
I don't know if this is very easy to do but I am still learning ASP.NET and this seems to be a very challenging task for me. Here's what I'm trying to do...
I'm trying to display a table, just like this:

I also need the rows' positions to be fixed.
ie. Light, (Adjust1/Adjust2: if it's not null), Nail, Sponge, Rod, Prod.Cost, etc.
And here's the content of the SQL database from which I'll fetch the data:

Shed some light please. Throw topics I need to research on, links, tutorials, etc. It would be very helpful to my learning.
Thank you for sharing your time and knowledge,
Pod Mays
PS: I'm also in the process of searching for other features like putting the Remarks when a cell is highlighted and hiding the Adjust columns when they're NULL.
|
using GridView to display data in fixed row positions
|
CC BY-SA 3.0
| null |
2011-04-22T13:52:59.157
|
2011-04-22T14:04:17.443
| null | null | 715,361 |
[
"c#",
"asp.net",
"sql-server"
] |
5,756,596 | 1 | 5,756,689 | null | 0 | 290 |
ClueTips is making the box look like this. I can barely read it. Where might I be going wrong?

Much thanks for any help. My HTML:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us" >
<head>
<link rel="stylesheet" href="/media/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="/media/blueprint/print.css" type="text/css" media="print">
<link rel="stylesheet" href="/media/cluetip/jquery.cluetip.css" type="text/css" media="print">
<script type="text/javascript" src="/media/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="/media/cluetip/jquery.cluetip.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a.tips').cluetip();
});
</script>
</head>
<body class="search">
<table id="search_results">
<tr>
<td><a class="tips" rel="/plasmid/1/" href="/plasmid/1/">SV40</a></td>
</tr>
<tr>
<td><a class="tips" rel="/plasmid/1/" href="/plasmid/4/">CAG</a></td>
</tr>
</table>
</body>
</html>
```
|
ClueTips - Text isn't readable, doesn't look like demo
|
CC BY-SA 3.0
| null |
2011-04-22T14:46:33.477
|
2011-04-22T15:00:31.770
| null | null | 13,009 |
[
"jquery",
"jquery-plugins",
"cluetip"
] |
5,756,985 | 1 | 5,757,014 | null | 1 | 915 |
I was trying to create a UIBarButton and add it to a tool bar using code. I fount the border of my button missing after running the app. My code as shown below.

```
//Add toolbar to the UITable View
toolbar = [[UIToolbar alloc] init];
toolbar.barStyle = UIBarStyleDefault;
toolbar.frame = CGRectMake(0, 436, 320, 50);
//Set the toolbar to fit the width of the app.
[toolbar sizeToFit];
UIBarButtonItem *flexButton =[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil
action:nil];
UIBarButtonItem *nextButton = [[UIBarButtonItem alloc]initWithTitle:@"Who Paid?"
style:UIBarButtonItemStylePlain
target:self
action:nil];
NSArray *buttonItems = [[NSArray alloc]initWithObjects:flexButton, nextButton, nil];
[self.toolbar setItems:buttonItems];
[self.navigationController.view addSubview:toolbar];
[buttonItems release];
[flexButton release];
[nextButton release];
[toolbar release];
```
Am I missing out on any step or is there a mistake that was made? Any help on this is greatly appreciated.
Thanks!
Zhen
|
Objective C: Missing border for UIBarButton in toolbar
|
CC BY-SA 3.0
| null |
2011-04-22T15:28:01.400
|
2011-04-22T15:31:08.073
| null | null | 683,898 |
[
"objective-c",
"uibarbuttonitem"
] |
5,757,012 | 1 | 5,792,547 | null | 19 | 4,916 |
I have a couple of custom `DialogPreference` implementations floating around, such as [this one](https://github.com/commonsguy/cw-lunchlist/blob/master/19-Alarm/LunchList/src/apt/tutorial/TimePreference.java):
```
package apt.tutorial;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.TimePicker;
public class TimePreference extends DialogPreference {
private int lastHour=0;
private int lastMinute=0;
private TimePicker picker=null;
public static int getHour(String time) {
String[] pieces=time.split(":");
return(Integer.parseInt(pieces[0]));
}
public static int getMinute(String time) {
String[] pieces=time.split(":");
return(Integer.parseInt(pieces[1]));
}
public TimePreference(Context ctxt) {
this(ctxt, null);
}
public TimePreference(Context ctxt, AttributeSet attrs) {
this(ctxt, attrs, 0);
}
public TimePreference(Context ctxt, AttributeSet attrs, int defStyle) {
super(ctxt, attrs, defStyle);
setPositiveButtonText("Set");
setNegativeButtonText("Cancel");
}
@Override
protected View onCreateDialogView() {
picker=new TimePicker(getContext());
return(picker);
}
@Override
protected void onBindDialogView(View v) {
super.onBindDialogView(v);
picker.setCurrentHour(lastHour);
picker.setCurrentMinute(lastMinute);
}
@Override
protected void onDialogClosed(boolean positiveResult) {
super.onDialogClosed(positiveResult);
if (positiveResult) {
lastHour=picker.getCurrentHour();
lastMinute=picker.getCurrentMinute();
String time=String.valueOf(lastHour)+":"+String.valueOf(lastMinute);
if (callChangeListener(time)) {
persistString(time);
}
}
}
@Override
protected Object onGetDefaultValue(TypedArray a, int index) {
return(a.getString(index));
}
@Override
protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
String time=null;
if (restoreValue) {
if (defaultValue==null) {
time=getPersistedString("00:00");
}
else {
time=getPersistedString(defaultValue.toString());
}
}
else {
time=defaultValue.toString();
}
lastHour=getHour(time);
lastMinute=getMinute(time);
}
}
```
They work just fine. However, in an application with `android:targetSdkVersion="11"` defined, on a XOOM, they show up missing the indent when in the `PreferenceActivity`:

Also, the font size appears a smidge bigger, at least for the title.
There's nothing in `DialogPreference` where I am really overriding any formatting behavior for that stuff, AFAIK. The preference XML is unremarkable, other than referring to the above class:
```
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<ListPreference
android:key="sort_order"
android:title="Sort Order"
android:summary="Choose the order the list uses"
android:entries="@array/sort_names"
android:entryValues="@array/sort_clauses"
android:dialogTitle="Choose a sort order" />
<CheckBoxPreference
android:key="alarm"
android:title="Sound a Lunch Alarm"
android:summary="Check if you want to know when it is time for lunch" />
<apt.tutorial.TimePreference
android:key="alarm_time"
android:title="Lunch Alarm Time"
android:defaultValue="12:00"
android:summary="Set your desired time for the lunch alarm"
android:dependency="alarm" />
<CheckBoxPreference
android:key="use_notification"
android:title="Use a Notification"
android:defaultValue="true"
android:summary="Check if you want a status bar icon at lunchtime, or uncheck for a full-screen notice"
android:dependency="alarm" />
</PreferenceScreen>
```
Anyone know where I'm going wrong?
Thanks!
---
[Here is a link to a project](http://misc.commonsware.com.s3.amazonaws.com/HCCustomPrefWoe.zip) that contains this custom preference and a simple preference XML file that demonstrates the problem. Even with just two Java classes, the preference XML, and an `arrays.xml` file, I get this phenomenon. [Here is a compiled APK](http://misc.commonsware.com.s3.amazonaws.com/scrap-debug.apk) from this project.
|
Custom preference, targetSdkVersion="11": missing indent?
|
CC BY-SA 3.0
| 0 |
2011-04-22T15:30:57.590
|
2016-02-04T17:33:04.553
|
2011-05-29T07:39:50.207
| 750,987 | 115,145 |
[
"android",
"android-3.0-honeycomb",
"android-preferences"
] |
5,757,023 | 1 | 5,757,448 | null | 0 | 1,130 |

The SPACE on after Data 1 and Data 2 I was trying to get rid of. If I put the same XML code without the TableLayout then it looks to be ok. What do I change?
The 3rd row with the "100" I wanted 2 entry textviews on the right side. I have tried everything I can think of and it will not go to the right. I removed the 2nd textview to see if that helped, but didnt make much difference.
Can anyone tell me what I did wrong? thank you!
Here is the XML:
```
<?xml version="1.0" encoding="utf-8"?>
```
```
<ScrollView android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableLayout android:layout_width="fill_parent"
android:stretchColumns="*" android:layout_height="fill_parent"
android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="6px">
<TableRow style="@style/FormRows" android:layout_marginTop="15sp">
<Button android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_marginLeft="5px"
android:layout_span="3" android:layout_weight="1" android:text="Save"
android:id="@+id/dgSave" />
</TableRow>
<TableRow style="@style/FormRows">
<TextView android:layout_width="70sp"
android:layout_height="wrap_content" android:textSize="16sp"
android:layout_weight="1" android:text="Data 1" />
<Spinner android:id="@+id/dgData0" android:layout_weight="2"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
</TableRow>
<TableRow>
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<EditText android:text="100" android:selectAllOnFocus="true"
android:imeOptions="actionNext" android:numeric="integer"
android:width="100sp" android:id="@+id/dgWarn0" android:gravity="right"
android:layout_height="wrap_content" android:layout_weight="1"
android:layout_gravity="right" android:layout_span="2" />
<EditText android:text="100" android:selectAllOnFocus="true"
android:imeOptions="actionNext" android:numeric="integer"
android:width="100sp" android:id="@+id/dgWarn1" android:gravity="right"
android:layout_height="wrap_content" android:layout_weight="1"
android:layout_gravity="right" android:layout_span="2" />
</LinearLayout>
</TableRow>
<TableRow style="@style/FormRows">
<TextView android:layout_width="70sp"
android:layout_height="wrap_content" android:textSize="16sp"
android:layout_weight="1" android:text="Data 2" />
<Spinner android:id="@+id/dgData1" android:layout_weight="2"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
</ScrollView>
```
THANK YOU! for any help!!!
Mark
|
android XML layout not working as expected with tablelayout and scrollview
|
CC BY-SA 3.0
| null |
2011-04-22T15:32:57.043
|
2011-04-22T16:24:48.377
|
2011-04-22T16:24:48.377
| 528,130 | 528,130 |
[
"android",
"xml",
"scrollview",
"tablelayout"
] |
5,757,097 | 1 | 5,757,301 | null | 4 | 4,025 |
Reading [this question](https://stackoverflow.com/questions/5753508/custom-colorfunction-colordata-in-arrayplot-and-similar-functions) on importing ColorData from matlab, I was wondering if there is a way to change the range of values over which the ColorFunction is scaled. That was probably not entirely clear, so let me show with a figure from matlab (the same example as in the previous question is used)

The plot on the left is the original, with the `ColorData` mapped to the data values between `-1` and `1`. Now, I can easily set it to be mapped to the data values between `0` and `1`, the result being that all values less than `0` are assigned blue color (lowest in the colormap). `PlotRange` is the closest function, and using `ClippingStyle` in addition to that produces a similar figure. However, it doesn't re-scale the ColorData to map to the plot range.
How can I do this in Mathematica?
BTW, to insert colorbars using Mathematica, you can look at this [function](http://www.walkingrandomly.com/?p=24)
|
Dynamic (or forced) scaling of ColorFunction
|
CC BY-SA 3.0
| null |
2011-04-22T15:41:27.477
|
2011-04-22T15:59:58.610
|
2017-05-23T12:13:39.697
| -1 | null |
[
"wolfram-mathematica"
] |
5,757,177 | 1 | 5,775,582 | null | 1 | 698 |
I followed the instructions on Apache Maven site and it works fine but during the tutorial i was asked to type in the below code, what does that mean and why does it keeps throwing me a build error?. However i tried to type single line everytime and also everything together nothing makes a difference. Could some one please help me interpret this one and how to get started with maven without errors?
Thanks a lot,
SS
```
mvn archetype:generate \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.mycompany.app \
-DartifactId=my-app
```
error below [UPDATE] , Updated the title also.

|
maven 3 archetype:generate Error
|
CC BY-SA 3.0
| null |
2011-04-22T15:48:14.713
|
2012-09-20T08:59:16.627
|
2012-09-20T08:59:16.627
| 1,047,365 | 458,437 |
[
"java",
"build",
"maven-3",
"maven-archetype"
] |
5,757,238 | 1 | 5,757,371 | null | 0 | 897 |
Basically I have two pieces of text and an image.
```
<div class="container">
<span class="title">Text</span>
<img src="an_image.png" />
<span class="note">Other Text</span>
</div>
```
I want all the elements to be at the bottom of the container div, the title to aligned to the left, and the note all the way to the right. The image will be right next to the title and aligned to the bottom of the title text. So far the only way I have gotten this to work is by using relative/absolute position. Is there a way to do this with CSS?
Here is an image of what I am trying to accomplish. I can change the width and height of the container and the title, image, and notes will align properly to the bottom, left, and right just like so:

|
How do I align texts and an image inside a div?
|
CC BY-SA 3.0
| null |
2011-04-22T15:53:12.243
|
2011-04-22T16:54:46.427
|
2011-04-22T16:54:46.427
| 611,690 | 611,690 |
[
"css",
"html",
"alignment"
] |
5,757,335 | 1 | 5,757,802 | null | 4 | 30,932 |
All I am trying to do is to remove the right zone of this site. How do I accomplish this?
Is there any site in SharePoint that doesn't have zones?

|
Sharepoint 2010 (left and right Zones) - Remove
|
CC BY-SA 3.0
| null |
2011-04-22T16:03:21.257
|
2014-08-21T15:51:55.657
| null | null | 352,334 |
[
"sharepoint",
"sharepoint-2010"
] |
5,757,386 | 1 | 5,763,003 | null | 109 | 80,975 |
I am trying to mask an image with something like this:

Would you please help me?
I am using this code:
```
- (void) viewDidLoad {
UIImage *OrigImage = [UIImage imageNamed:@"dogs.png"];
UIImage *mask = [UIImage imageNamed:@"mask.png"];
UIImage *maskedImage = [self maskImage:OrigImage withMask:mask];
myUIIMage.image = maskedImage;
}
```
|
How can I mask a UIImageView?
|
CC BY-SA 3.0
| 0 |
2011-04-22T16:08:27.293
|
2022-10-05T18:40:01.123
|
2018-02-02T11:45:47.553
| 3,151,675 | 319,097 |
[
"ios",
"objective-c",
"uiimage",
"mask"
] |
5,757,887 | 1 | null | null | 1 | 504 |
`SELECT` statement looks like:
```
SELECT Co.info, FROM_UNIXTIME(co.date,'%m-%d-%y'), P.fname, P.lname
FROM Course C, Comment Co, Professor P
WHERE C.cID = Co.cID
AND C.cID = ?
AND P.pID = Co.pID;
```
Its datatype in the DB is Timestamp, was looking to use possibly CAST to transform the output.
How can I get it to output it in MM-DD-YY order, currently it displays: `2011-04-17 20:35:22`

```
<?php
if ($sth2->rowCount()) {
while($row = $sth2->fetch(PDO::FETCH_ASSOC)) {
echo "<p>{$row['date']} <img src='img/ProfessorTag.png'
alt='Course Rating about {$row['fname']} {$row['lname']}'/>
{$row['fname']} {$row['lname']}<br />
<img class='left' style='margin:5px;' src='img/courseComment.png'/>
{$row['info']}</p>";
}
}
else
{
echo "<h3 style='color:red;'> No comments found, please
<a href='index.php'>find a professor</a> .</h3></div>";
}
```
|
Convert Timestamp to MM-DD-YY using Cast Mysql
|
CC BY-SA 3.0
| null |
2011-04-22T17:02:14.540
|
2011-04-26T23:53:37.437
|
2011-04-26T23:53:37.437
| 650,492 | 700,070 |
[
"php",
"mysql"
] |
5,758,091 | 1 | 5,758,139 | null | 13 | 34,362 |
I want to write a stored procedure that accept an XML parameter, parsing it's elements and inserting them in a table. This is my XML:

I want to loop in that parameter(such as a foreach in C#), retrieving each person, then parsing it's data(ID,NAME,LASTNAME) inserting them in a table that has 3 fields.
How can do that?
|
How to loop and parse xml parameter in sql server stored procedure
|
CC BY-SA 3.0
| 0 |
2011-04-22T17:21:23.927
|
2018-11-12T14:23:48.797
|
2013-06-11T16:19:12.680
| 271,200 | 648,723 |
[
"xml",
"sql-server-2005",
"sql-server-2008",
"linq-to-xml"
] |
5,758,154 | 1 | 5,758,250 | null | 75 | 59,146 |
I have been working the whole day to try to build my app on my device.
I get this error when I try to build on my device.
I have been reading about this problem but do not really understand how to fix it. The following is where I would believe the problem is. I am new on this so I have no experience how to solve this.
When I open the "" I have "" with two lines I can select and also "" with one line to select. Do not know if this is where the problem is?
Any help is appreciated.

|
Code Sign error: Provisioning profile can't be found
|
CC BY-SA 3.0
| 0 |
2011-04-22T17:28:47.910
|
2015-04-26T08:23:55.387
|
2013-02-26T08:00:02.260
| 320,018 | 418,332 |
[
"iphone",
"xcode4",
"code-signing"
] |
5,758,545 | 1 | 5,758,628 | null | 9 | 8,029 |
I had to make some changes in an application done by a guy who worked on a project before me. I asked him for the sources and he gave them to me. The problem is that when I try to build (even before making any changes) I get the following error:
"Error 1 Unable to find manifest signing certificate in the certificate store."

What can I do to fix this error?
|
Why can't I find the certificate to sign the ClickOnce manifest?
|
CC BY-SA 3.0
| null |
2011-04-22T18:14:08.347
|
2013-05-17T13:28:15.767
|
2013-05-17T13:28:15.767
| 1,751,715 | 569,872 |
[
"c#",
"visual-studio",
"manifest"
] |
5,758,653 | 1 | 5,808,408 | null | 4 | 1,529 |
I created an application in XCode 4 that uses Core Plot.
I installed Core plot as an aditional SDK following the instructions from here:[http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications](http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications) (Install SDK)
The instructions for "static Library" haven't been updated yet fro XCode 4.
I can run the app in the simulator, install it on my iPhone and everything works just ok. I was even able to send it to beta testers using several services like TestFlight. For this, I had to generate an archive and then "share" by generating the .ipa file. No single problem here.
Now, when I try to validate/submit the app I got this error:

I'm selecting the "distribution" configuration, then product -> archive, then in the Organizer I try "validate" or "submit", but I always get this same result.
I also made sure that the "skip install" is set to NO. This part is confusion, Apple says it should be YES and many posts here say it should be NO. If I set it to YES, the app is not even archived.
At this point I'm not even sure if the issue is the "skip install" flag or core plot. I found this question: [http://code.google.com/p/core-plot/issues/detail?id=280](http://code.google.com/p/core-plot/issues/detail?id=280), so I think my issue may be related.
If I open the archive file, this is what is inside:


Any ideas/suggestions will be truly appreciated.
|
Can't submit app with CorePlot using Xcode4
|
CC BY-SA 3.0
| 0 |
2011-04-22T18:26:57.713
|
2011-04-27T17:55:37.233
| null | null | 454,530 |
[
"xcode4",
"app-store",
"core-plot",
"ipa"
] |
5,759,005 | 1 | 5,759,022 | null | 3 | 714 |

What would be the best way to make these buttons? I have no problem with the right/left buttons, but this "tab" functionality is eluding me.
I was thinking of adding custom buttons on viewDidLoad like:
```
UIButton *profileBtn = [[UIButton alloc] initWithFrame:CGRectMake(50, 5, 100, 30)];
[profileBtn setTitle:@"Profile" forState:UIControlStateNormal];
[self.navigationController.navigationBar addSubview:profileBtn];
```
However, then the buttons stay on the navigation bar until I manually get them off. Surely there is a better/easier way to do something like this? (note that I'm already using the UITabBarController on the bottom of the screen)
|
iOS navigation bar with "tab like" functionality/buttons
|
CC BY-SA 3.0
| 0 |
2011-04-22T19:01:25.297
|
2011-04-22T19:03:23.043
| null | null | 331,844 |
[
"objective-c",
"uinavigationcontroller",
"tabs",
"uinavigationbar"
] |
5,759,077 | 1 | 5,759,100 | null | 19 | 15,288 |
I am new and stupid. I closed this window:

How this window is called and how to activate it. Make it pop up.
|
Lost window in visual studio 2010
|
CC BY-SA 3.0
| 0 |
2011-04-22T19:10:52.710
|
2011-04-22T19:20:01.980
| null | null | 715,999 |
[
"visual-studio-2010"
] |
5,759,074 | 1 | 5,760,613 | null | 1 | 1,644 |
I have a documentviewer which i used in my wpf project to show xps document reports of having around 600 pages which is working great. But from user point of view i like to show the current page number as a tooltip on my scrollviewer while dragging the scroll stating the current page number in view. Somewhat like in a PDF file like this -

I was looking out for some ideas how to implement this. Just a current page number if not possible to show a thumbnail image would be good enough for me.
Is there any in-built support in documentviewer for this functionality??
Thanks for any help..
|
Tooltip on scrollviewer in documentviewer
|
CC BY-SA 3.0
| 0 |
2011-04-22T19:10:48.540
|
2011-04-23T01:34:03.360
| null | null | 632,337 |
[
"wpf",
"wpf-controls",
"scrollviewer",
"documentviewer",
"xpsdocument"
] |
5,759,130 | 1 | 5,759,182 | null | 67 | 32,160 |
I've been experimenting with a Chrome Extension, and I want to make one similar to my Google Voice Extension where the icon shows a little blue "1" next to the icon when I receive an event, Is this a whole separate icon? and then they just use the "setIcon" method? Like this
```
chrome.browserAction.setIcon({path:"icon.png"});
```
Here's a visual example of how it looks:

The gmail one seems to go all the up to 500! They can't have an icon for each number, or do they?? Is there something I can use thats made to do this stuff? I already have my icon, if I have to make a unique one I may just make like 10 and then have a "10+" icon. I am connecting it to an API which could have a lot of events.
Has anybody had this issue? How did they get around it?
Any advice or suggestions would help!
Thanks!
|
Google Chrome Extension Numbers on the Icon
|
CC BY-SA 3.0
| 0 |
2011-04-22T19:17:39.640
|
2021-03-16T12:25:23.343
| null | null | 242,934 |
[
"icons",
"google-chrome-extension"
] |
5,759,141 | 1 | 5,759,226 | null | 4 | 2,097 |
>
[WPF MessageBox window style](https://stackoverflow.com/questions/5289328/wpf-messagebox-window-style)
For some reason the `MessageBox` that comes with WPF has visual styles disabled and I can't find a way to turne them on, in Windows Forms it was simply a matter of calling `Application.EnableVisualStyles()` at the start of your program.
To get an idea of what I'm talking about, here are the two examples:
```
System.Windows.Forms.Application.EnableVisualStyles();
System.Windows.Forms.MessageBox.Show(
"Windows Forms Dialog",
"Message Box Test",
System.Windows.Forms.MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.Asterisk);
```

```
System.Windows.MessageBox.Show(
"WPF Dialog",
"Message Box Test",
System.Windows.MessageBoxButton.OK,
System.Windows.MessageBoxImage.Asterisk);
```

Calling `System.Windows.Forms.Application.EnableVisualStyles()` has no affect for WPF.
The [Extended WPF Toolkit](http://wpftoolkit.codeplex.com/wikipage?title=MessageBox&referringTitle=Home) has a nice themable implementation, but I'm looking for a way to create message boxes that match the operating system that the user is running on. The EWPFT implementation is fantastic if you want the same style on every operating system.
|
Does anyone know how to get the WPF MessageBox to look better (like the Windows Forms equivelant)?
|
CC BY-SA 3.0
| 0 |
2011-04-22T19:19:19.937
|
2019-04-30T15:06:31.823
|
2019-04-30T15:06:31.823
| 3,195,477 | 140,037 |
[
".net",
"wpf"
] |
5,759,253 | 1 | 5,764,140 | null | 2 | 5,880 |
I have the following IR (infrared) image of a human fist captured with a webcamera converted to work in IR. The picture has captured the veins under the skin. What i want to do is just retain the fist and get rid of the surrounding black area. How do i do this in MATLAB?

Here is what I have done so far, but I'm just getting a black image for this
```
a=imread('1.jpg');
figure; imshow(a);
b=rgb2gray(a);
figure;
imshow(b);
[j,k]=size(b);
for g=1:j
for f=1:k
if b(j,k)>0.06
c(j,k)=0;
else c(j,k)=1;
end
end
end
figure,imshow(c);
```
Can somebody please tell me what I'm doing incorrectly, and how I can accomplish what I want? Also when i mean i want to get rid of the background i mean I want a white background instead of the black one>Cos the purpose of this project is to retain just the veins, the veins will be retained as black . and then i will take the co ordinates of these points .So i dont want the background to be generated as co ordinates as well...! So i want the background as white ..! how to do this ?
|
Matlab:How to eleiminate the black background and retain the region of interest in my image?
|
CC BY-SA 3.0
| 0 |
2011-04-22T19:30:12.823
|
2011-05-13T03:59:54.177
|
2011-04-24T16:35:10.030
| null | 720,746 |
[
"matlab",
"image-processing",
"threshold"
] |
5,759,308 | 1 | 5,760,317 | null | 3 | 431 |
In the app represented by the image below, I'm currently using three UIViewControllers: One master view controller, one for the main menu, and one for a settings screen which is launched by the main menu. As I'm learning more about how UIViewController works and what it's designed for, I'm questioning the wisdom of my architecture.
It seems to me that the main point of subclassing is to be able to override the methods which get called automatically during the life cycle of the controller: viewDidAppear, viewWillAppear, willRotateToInterfaceOrientation, etc. It appears that these methods are only called if the UIViewController (or subclass) is part of the UIViewController hierarchy. Therefore, there's no point in subclassing UIViewController unless I'm going to use one of the standard means of creating a viewcontroller hierarchy i.e. UINavigationController, [UIViewController presentModalViewController] etc.
I'm wary of using the Cocoa-style means of adding view controllers to the hierarchy because they all seem to be very restrictive. For example, I could display my settings screen using [UIViewController presentModalViewController], but but I don't want it to obscure the entire screen. There's background animation which I want the user to be able to interact with even while the settings screen is visible.
Here are my questions:
1) Is it silly to subclass UIViewController unless I'm going to be adding it to the viewController hierarchy via one of Apple's techniques?
2) Am I correct in my assumption that the built-in means of displaying new views are too restrictive for me, and in order to have the flexibility I want, I'm going to need to just load views via [view addSubview]
3) If it's true that subclassing UIViewController makes no sense for my menu and settings views, how should I avoid having all of my code in one monster UIViewController subclass. Should I just subclass NSObject, add the appropriate IBOutlets and IBActions and pass that in as the File's Owner when I load the nib using [NSBundle loadNibNamed]?

|
should uiviewcontrollers always be part of the viewcontroller hierarchy?
|
CC BY-SA 3.0
| 0 |
2011-04-22T19:36:27.577
|
2011-04-22T21:37:24.717
| null | null | 44,683 |
[
"iphone",
"ios",
"ipad",
"uiviewcontroller"
] |
5,759,335 | 1 | 5,759,473 | null | 1 | 307 |
I am beginning Android app development and I would like to know which device would give me the most comprehensive testing environment. I would like my app to be compatible with the most number of devices without breaking the bank by buying a dozen devices. Just testing on the emulator is not an option because it runs at 1/10th of normal speed.
Should I purchase a device with the most common OS? As of now, 2.2 is the most popular. Obviously, a 2.2 device wouldn't be able to test run an app made for 3.0. But is the reverse also true? If I buy a 3.0 device, would that allow me to test all lower versions?

Given that my app won't be dealing with phone calls, should I be buying a phone or tablet? Are the two sufficiently the same except for resolution? Has your app ever worked on a tablet but failed on a phone? The Apple iPad has a neat emulation mode for iPhone apps. Is this feature also available on Android tablets?
Price is also a big consideration when choosing a tablet over a phone. I'm not going to sign up for another cellular plan, so most phones would have me fork over $500+. That would come out to be the same price as the Motorola Xoom. But arguably Android phones are much more popular than tablets, so a Xoom wouldn't let me see what most of my users would be seeing.
|
Which Android device to get for app testing?
|
CC BY-SA 3.0
| null |
2011-04-22T19:40:43.740
|
2011-04-22T20:00:34.610
| null | null | 459,987 |
[
"android"
] |
5,759,758 | 1 | 5,761,172 | null | 2 | 2,135 |
I have a 114x114 bitmap called "x.bmp" in my debug folder and this simple code
```
#include <allegro.h>
BITMAP *Sprite;
int main(){
allegro_init();
install_keyboard();
set_color_depth(16);
set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);
Sprite = load_bitmap( "x.bmp", NULL);
acquire_screen();
draw_sprite(screen, Sprite, 50, 50);
release_screen();
readkey();
return 0;
}
END_OF_MAIN();
```
But it freezes up and looks like this

But when I just run the `AllegroTest.exe` file via windows explorer
I am using Allegro 4.2.3 and MSVC++ 2008
here's something interesting I get in my debug output window:
```
al-gfx INFO: The driver will wait for vsync.
al-gfx INFO: set_gfx_card success for 640x480x16.
Assert failed at line 250 of c:\users\matthew\desktop\allegro\4.2\include\allegro\inline\draw.inlThe thread 'Win32 Thread' (0x137c) has exited with code -805306369 (0xcfffffff).
The thread 'Win32 Thread' (0x25b8) has exited with code -805306369 (0xcfffffff).
```
c:\users\matthew doesn't exist!!! I have no user named matthew?
|
Allegro draw_sprite()
|
CC BY-SA 3.0
| null |
2011-04-22T20:28:37.470
|
2011-04-23T00:00:58.020
|
2011-04-22T23:58:34.823
| 1,246,275 | 1,246,275 |
[
"c++",
"visual-c++",
"bitmap",
"sprite",
"allegro"
] |
5,759,822 | 1 | 5,761,918 | null | 8 | 975 |
I embarked on a set of major changes that touch a lot of different areas of the application, have required changes to the database schema, our objects and presentation code. I started at rev.1101 You could consider it a perfect case for creating a Branch to be later merged and integrated back into the Trunk once it was tested and complete.

The Trunk is now at rev.1116 and I'm in the unenviable (?) position that I have to perform some bugfixes on the revision about 15 versions ago which is the current release in production and then release bugfixed "rev.1101+bugfixes" to production without any of the work from revs 1102-1116.
Do I create a Branch from what's in the Trunk right now and that becomes /Branches/MajorChangeSet, then revert the Trunk back to rev.1101, treat that as the now-official Trunk and start work on the bugfixes there?

I followed the procedure recommended by ChrisH below (according to the mockup above) and we're now in great shape. We have been continuing to update the "rev. 1102 production" with fixes and minor feature enhancements. These have been painless and easy to merge into the trunk to make sure that these changes also make it into our new development effort. Thanks all!
[Branch v. Trunk](https://stackoverflow.com/questions/1679666/replacing-branched-project-with-current-trunk-version-of-a-project-in-svn) | [Branch/Tag/Trunk?](https://stackoverflow.com/questions/16142/what-do-branch-tag-and-trunk-really-mean) | [Branch when?](https://stackoverflow.com/questions/2100829/when-should-you-branch)
|
I kept working in Trunk when I should have created a Branch for some major changes (Subversion, TortoiseSVN)
|
CC BY-SA 3.0
| 0 |
2011-04-22T20:37:38.760
|
2011-04-28T19:49:45.583
|
2017-05-23T11:57:02.593
| -1 | 369,601 |
[
"svn",
"tortoisesvn"
] |
5,759,859 | 1 | 5,761,646 | null | 3 | 8,966 |
I have this exercise:
"use a recursion tree to determine a good asymptotic upper bound on the recurrence T(n)=T(n/2)+n^2. Use a substitution method to verify your answer"
I have made this recursion tree

Where I have assumed that k -> infinity (in my book they often stop the reccurence when the input in T gets 1, but I don't think this is the case, when I don't have other informations).
I have concluded that:

When I have used the substitution method I have assumed that T(n)=O(n^2)
And then done following steps:

When n>0 and c>0 I see that following is true for some choice of c

And therefore T(n)<=cn^2
And my question is: "Is this the right way to do it? "
|
Recursion tree and substitution method
|
CC BY-SA 3.0
| null |
2011-04-22T20:43:56.637
|
2011-04-23T02:05:21.620
|
2011-04-22T21:23:29.783
| 21,234 | 680,850 |
[
"algorithm",
"recursion",
"performance"
] |
5,759,964 | 1 | 5,760,005 | null | 0 | 110 |
One of the buttons on my site has a slow response for the OnHover, and Im not sure why this is happening.
[http://davincispainting.com](http://davincispainting.com) then click on the upper-right button "Click for Quick Connect"

```
<div id='contact-form'>
<a class="contact" href="#"></a>
</div>
a.contact {
background-image: url("/images/Home/RapidButton2.png");
display: block;
font-size: 11px;
text-align: center;
width: 165px;
height: 27px;
}
a.contact:hover {
background-image: url("/images/Home/RapidButtonHov2.png");
}
```
|
Sprite Solution for Slow OnHover Event & 2 Images
|
CC BY-SA 3.0
| null |
2011-04-22T20:56:51.850
|
2011-04-22T21:30:51.430
|
2011-04-22T21:30:51.430
| 598,931 | 598,931 |
[
"html"
] |
5,760,157 | 1 | null | null | 0 | 2,240 |
I have used [jQuery Cycle](http://jquery.malsup.com/cycle/) in numerous projects. This time round I am getting a really bizarre visual glitch. On page load, all the slides are shown on top of each other, then as the script cycles through each slide, it eventually fixes itself (until the page is reloaded). For the example and code click [here](http://adriantrimble.com/cycleglitch/). The image below shows the glitch which seems to be happening in all browsers (tested in Firefox 4, Safari 5, Chrome 10, IE8)

Adding a background colour to each slide `div` does "fix" the problem in that it hides the other slides, but it isn't really a proper solution in my opinion.
Been battling with this all afternoon and I'm at a bit of a loss. Any help would be greatly appreciated.
Thanks
|
jQuery Cycle Slides overlap on page load
|
CC BY-SA 3.0
| 0 |
2011-04-22T21:17:36.003
|
2011-11-10T05:45:37.370
| null | null | 142,195 |
[
"jquery",
"html",
"css",
"cycle"
] |
5,760,169 | 1 | 5,760,204 | null | 1 | 1,498 |
I am getting an error while i am registering php variable to html form element through javascript. Like If In my code there is php variable `$edu_notes` and i am assigning this variable's value to a html form element that is
```
<textarea name="1_1_50" id="1_1_50" ></textarea>
```
and My Javascript code is :
```
document.getElementById('1_1_50').value = "<?php echo $edu_notes; ?>";
```
the value of `$edu_notes` comes from linkedin profile which is :
```
"First Text Line
Second Text Line"
```
there is a gap of blank line between its first text line and second text line.
And the javascript gives an error that is
```
unterminated string literal
"First Text line
```
Javascript is not getting the full value as a string because of blank line. I have tried some php functions like `filter_var(),nl2br(),trim()` but not resolving this issue. I have also tried to type cast through `(string) $edu_notes`.
In my source file what i am getting please see screenshot below :

I am doing this type of functionality because all the form elements are coming from database dynamicaly.
|
How to trim unwanted newlines/linebreaks from PHP variable?
|
CC BY-SA 3.0
| null |
2011-04-22T21:19:12.713
|
2011-04-22T21:51:21.973
|
2011-04-22T21:25:11.450
| 451,969 | 445,646 |
[
"php",
"javascript",
"newline",
"line-breaks"
] |
5,760,672 | 1 | 5,760,731 | null | 0 | 1,234 |
First problem is the list of what pops up is far below the actual textbox. See pic.

2nd problem is it takes a full second or two to get any results using auto completion. I doubt its database/retrieval related, because using a local string array of names, gives me the same results.
.aspx
```
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:TextBox ID="txtFrom" runat="server">
</asp:TextBox>
<ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtFrom" MinimumPrefixLength="1" ServiceMethod="GetSuggestions" EnableCaching="true">
</ajaxToolkit:AutoCompleteExtender>
```
My web method is in my cs class
```
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string[] GetSuggestions(string prefixText, int count)
{
IList<String> donors = new List<String>();
NHibernateSessionManager sessionManager = new NHibernateSessionManager();
NHibernate.ISession session = sessionManager.GetSession();
NHibernateDataProvider2 provider = new BT4SGWebApplication.NHibernateDataProvider2(session);
ExtraUserInfo user = provider.CRIT_GetDistinctExtraUserInfoByUserName(System.Web.HttpContext.Current.User.Identity.Name)[0];
return user.GroupTable.PayorDonors.Where(x => x.Name.FullName.StartsWith(prefixText)).OrderBy(x => x.Name.FullName)
.Select<PayorDonor, string>(x => x.Name.FullName).ToArray();
}
```
PS - hit isn't my last name.
|
Improving speed AJAX AutoCompletion - ASP.NET C#
|
CC BY-SA 3.0
| null |
2011-04-22T22:28:01.623
|
2011-04-22T22:39:18.167
| null | null | 669,913 |
[
"c#",
"asp.net",
"ajax"
] |
5,760,765 | 1 | 5,760,994 | null | 5 | 12,331 |
I've a list of protein names(P1,P2,...,Pn) and they are categorized to three different expression levels High(H), medium(M) and Low(L) as measured in three experimental conditions (Exp1,Exp2, and Exp3).

I wish to make a plot as shown in the bottom part of the figure, with the name of the proteins at the left and name of experiments along the top and high, medium and low categories are indicated by Red,blue and green respectively.
I'm new to R, I would much appreciate any help.
Thanks in advance
|
Plot of categorical data using R
|
CC BY-SA 3.0
| 0 |
2011-04-22T22:44:15.690
|
2011-04-24T15:44:20.030
|
2011-04-24T15:44:20.030
| 602,276 | 582,384 |
[
"r",
"plot",
"ggplot2",
"bioinformatics"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.