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,730,020
1
5,730,272
null
0
624
I got a question is using UISlider to control a image animation And this image has invisible slider to cover on it ... It looks like this ![enter image description here](https://i.stack.imgur.com/Ye2Pb.png) My question is ... how to adjust image angle ,when I change my slide value ??? So that's I can let the image animation from left pic to right pic ??? Thanks Webber upload the sample code [Here](http://www.sendspace.com/file/cwyymn) Hope someone can help me to figure out this problem
How to implement image animation via an invisible UIslider?
CC BY-SA 3.0
null
2011-04-20T12:11:17.037
2011-04-21T05:16:12.470
2011-04-21T03:33:36.607
437,132
437,132
[ "iphone", "objective-c", "ios", "animation", "uislider" ]
5,730,144
1
null
null
1
175
I am new to Java Script. This HTML and Java Script code transliterates an English word to Bengali, using the Google Transliteration API. I load this file in a browser and the result appears on the page (just the Bengali word). Viewing the page source in Firefox shows an empty `<div id="transliteration"></div>` tag, as it was in the HTML code I loaded. But using Firebug, I can clearly see that the Bengali word is indeed within this tag. Again, using HttpFox I can see the `result` object received by the script from Google. Questions are; Why is the page source in Firefox devoid of the result, even though Firefox has rendered the result and I can see it right there ? Where on disk are these programs (Firebug and HttpFox) looking for the `result` object ? ``` <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script type="text/javascript" src="https://www.google.com/jsapi?key=MY_KEY"> </script> <script type="text/javascript"> google.load("language", "1"); function initialize() { google.language.transliterate(["Mohona"], "en", "bn", function(**result**) { if (!result.error) { var container = document.getElementById("transliteration"); if (result.transliterations && result.transliterations.length > 0 && result.transliterations[0].transliteratedWords.length > 0) { container.innerHTML = result.transliterations[0].transliteratedWords[0]; } } }); } google.setOnLoadCallback(initialize); </script> </head> <body> <div id="transliteration"></div> </body> </html> ``` The result in the div tags (Firebug): ![enter image description here](https://i.stack.imgur.com/xVCaW.png) The result object (HttpFox). Sorry for the poor quality image. The last line of black text is the entire result object (not the orange bar). ![enter image description here](https://i.stack.imgur.com/HkDr4.png)
Where is the Java Script object stored on disk?
CC BY-SA 3.0
null
2011-04-20T12:21:15.317
2011-04-21T19:18:48.110
2011-04-21T19:18:48.110
377,798
377,798
[ "javascript", "google-translate" ]
5,730,182
1
5,730,356
null
1
316
After we have finished rendering a frame either using DirectX or OpenGL in C++, I would like to add this "swirling" effect just on a portion of the frame. Something like this below: ![enter image description here](https://i.stack.imgur.com/T2odX.jpg) So how do we normally achieve this?
Adding whirl effect on DirectX/OpenGL application
CC BY-SA 3.0
null
2011-04-20T12:23:29.943
2011-04-20T12:33:53.570
null
null
144,201
[ "opengl", "directx", "post-processing" ]
5,730,312
1
5,730,367
null
3
8,663
I have two images, one should go slightly above like this one. ![enter image description here](https://i.stack.imgur.com/ZUz2B.png) This is what I have so far: [http://www.ryansammut.com/orijen/products.html](http://www.ryansammut.com/orijen/products.html) At the moment if I put it slightly downwards, the other image will get over the dogs image.
CSS Two Images Over Each Other
CC BY-SA 3.0
null
2011-04-20T12:30:53.253
2011-04-20T12:43:19.983
null
null
658,809
[ "css" ]
5,730,346
1
5,731,412
null
0
147
Can someone tell me how I can create a nested row in a flex datagrid, like the diagram below? ![enter image description here](https://i.stack.imgur.com/gadu9.png)
How to create a DataGrid in Flex?
CC BY-SA 3.0
null
2011-04-20T12:33:08.040
2011-04-20T19:21:40.927
null
null
624,377
[ "flex4", "flex-datagrid" ]
5,730,379
1
5,730,426
null
0
5,208
I have this dropdown (select) menu generated with JQuery, dynamically using JSON coming from PHP script. Refer on the picture attached, under the Components label. The "select" menu holds Component name and Component ID (value). ![example](https://i.stack.imgur.com/QDx9F.png) I want "on change" event, using JQuery, to populate the following fields Code, Category and UOM, with corresponding values. My JSON object retrieves everything what is needed (I managed to achieve this with JQuery autocomplete). eg. ``` [{"id":"4","component":"Component 1","code":"COMP1","uom":"kilo","category":"Flour"}...] ``` This is my code for generating the "select" menu with options inside coming from the above mentioned JSON. ``` $.getJSON("<?php echo site_url('products/dropdown/no'); ?>", function(result) { var optionsValues = '<select>'; optionsValues += '<option value="">' + '--' + '</option>'; $.each(result, function() { optionsValues += '<option value="' + this.id + '">' + this.component + '</option>'; }); optionsValues += '</select>'; var options = $("select[name=component]"); options.replaceWith(optionsValues); }); ``` It is located in the $(document).ready. So, I need function or something which whenever change in the "select" menu occurs, it will populate the mentioned fields around with corresponding values. Thank you very much in advance.
JQuery dynamic dropdown menu on change populates other fields
CC BY-SA 3.0
null
2011-04-20T12:35:45.793
2011-04-23T09:38:45.773
2011-04-21T12:59:36.690
641,048
641,048
[ "php", "javascript", "jquery", "ajax", "codeigniter" ]
5,730,564
1
5,730,903
null
0
897
I have a textbox and instead of showing the regular 1px bordered layout, I am trying to apply a custom curved image as background for that.. For some reasons, the background is not applied correctly on desktop Safari as well as iPad Mobile Safari..It works fine in IE/FF..Below is the code; ``` <div class="inputBox"><input type="text" name="text1"></div> #rightContent .inputBox{ background:transparent url(/images/dp/search_screen/keyback.gif) no-repeat scroll center 6px; border:0pt none; float:left; height:40px; #height:37px; margin-left:10px; width:450px; overflow: hidden; } #rightContent .inputBox input{ padding:12px 8px 5px 12px; width:446px; margin: 0px; border: 0px none; background:transparent none no-repeat scroll center; display: block; /*outline: none;*/ height: 40px; #height:37px; #width: 430px; #position: relative; #left: 2px; #padding:11px 0px 8px; } ``` Below are the screenshot IE/FF: ![enter image description here](https://i.stack.imgur.com/Vz0WY.jpg) Safari: ![enter image description here](https://i.stack.imgur.com/s79hx.jpg)
Safari textbox background issue
CC BY-SA 3.0
null
2011-04-20T12:47:58.987
2011-04-20T13:19:54.167
2011-04-20T13:11:16.650
485,743
485,743
[ "javascript", "css", "safari", "mobile-safari" ]
5,730,631
1
5,730,632
null
45
74,868
[cstheory.stackexchange.com](http://cstheory.stackexchange.com)[stats.stackexchange.com](http://stats.stackexchange.com) Is there an existing algorithm that returns to me a similarity metric between two bitmap images? By "similar", I mean a human would say these two images were altered from the same photograph. For example, the algorithm should say the following 3 images are the same (original, position shifted, shrunken). ## Same ![enter image description here](https://i.stack.imgur.com/CoPLU.jpg) ![enter image description here](https://i.stack.imgur.com/5mdmp.jpg) ![enter image description here](https://i.stack.imgur.com/Qwotl.jpg) I don't need to detect warped or flipped images. I also don't need to detect if it's the same object in different orientations. ## Different ![enter image description here](https://i.stack.imgur.com/CoPLU.jpg) ![enter image description here](https://i.stack.imgur.com/wFxG7.jpg) I would like to use this algorithm to prevent spam on my website. I noticed that the spammers are too lazy to change their spam images. It's not limited to faces. I already know there's already many great facial recognition algorithms out there. The spam image could be anything from a URL to a soccer field to a naked body.
Image similarity comparison
CC BY-SA 3.0
0
2011-04-20T05:34:06.987
2021-04-11T10:59:06.247
2020-06-20T09:12:55.060
-1
459,987
[ "algorithm", "image-processing", "image-recognition" ]
5,730,867
1
5,730,981
null
4
1,816
I am trying to send email using the following piece of code in Winforms app. Username and Password are correct and real- but have masked in the code. I don't know wheather my local machine has the capacity to send emails or not? But please advise me , What do I need to look at my machine Configuration(in IIS)? ERROR: "No connection could be made because the target machine actively refused it 209.85.143.109:587" ``` //All Variable Declarations String senderAddress = string.Empty; String receiveraddress = string.Empty; String emailSubject = string.Empty; String emailMessageText = string.Empty; MailMessage mail = new MailMessage(); SmtpClient client = new SmtpClient("smtp.gmail.com",587); private void btnEmail_Click(object sender, EventArgs e) { try { //Get the Values of Controls senderAddress = txtSenderEmail.Text; receiveraddress = txtReceiverEmail.Text; emailSubject = txtSubject.Text; emailMessageText = txtMessageBody.Text; //Pass the Values mail.From = new MailAddress(senderAddress, "xxxxxxxxxx", System.Text.Encoding.UTF8); mail.To.Add(receiveraddress); mail.Subject = emailSubject; mail.Body = emailMessageText; client.UseDefaultCredentials = false; client.Credentials = new NetworkCredential("[email protected]", "xxxxxx"); client.EnableSsl = true; client.Send(mail); System.Windows.Forms.MessageBox.Show("Email Sent Successfully"); } catch (Exception mailException) { System.Windows.Forms.MessageBox.Show("Message Not Sent ,Error: " + mailException.Message); throw; } finally { } } ``` I have done a telnet for both the ports and the error comes is : Could not open connection to the host. Please look at the following pic, it should give you more clarity, ![enter image description here](https://i.stack.imgur.com/egcno.gif)
Sending Email - Error
CC BY-SA 3.0
null
2011-04-20T13:11:11.737
2011-04-20T14:34:16.533
2011-04-20T14:34:16.533
76,337
424,611
[ "c#" ]
5,730,910
1
5,735,014
null
2
2,211
I am trying to plot two lines series on a chart. Each line with have different times for their data points. Unfortunately, the code below produces a weird result (probably because the there is not a timestamp for the current level line). Is there another chart type or way that I can fix this issue of the current level going down to zero each target level? Here is my xaml: ``` <chartingToolkit:Chart Title="Glucose and Target Levels" x:Name="LevelsChart"> <chartingToolkit:StackedLineSeries> <chartingToolkit:SeriesDefinition Title="Actual" ItemsSource="{Binding ElementName=PatientWindow, Path=GlucoseLevels}" IndependentValuePath="Timestamp" DependentValuePath="Level" /> <chartingToolkit:SeriesDefinition Title="Target" ItemsSource="{Binding ElementName=PatientWindow, Path=TargetLevels}" IndependentValuePath="Timestamp" DependentValuePath="Level" /> </chartingToolkit:StackedLineSeries> <chartingToolkit:Chart.Axes> <chartingToolkit:DateTimeAxis x:Name="LevelsDateTimeAxis" Orientation="X" Minimum="{Binding ElementName=PatientWindow, Path=Minimum}" Maximum="{Binding ElementName=PatientWindow, Path=Maximum}" /> <chartingToolkit:LinearAxis Orientation="Y" Minimum="0" Maximum="200" Interval="20" /> </chartingToolkit:Chart.Axes> </chartingToolkit:Chart> ``` Here is the result: ![enter image description here](https://i.stack.imgur.com/s53zE.png)
Plot Two Line Series on One Graph
CC BY-SA 3.0
null
2011-04-20T13:14:17.510
2011-04-20T18:37:37.213
null
null
27,669
[ "wpf", "wpftoolkit", "charts" ]
5,731,040
1
5,819,215
null
1
1,142
Background: I have a webForm app that registers a user in the database based on the information provided with a web service, auto-generates a random password and username, and e-mails the user a link to take an application based on the marketing company selected. Questions: - Each user allowed access to the system will have membership in at least one of the marketing groups as defined by the web.config. For example, a user that is currently logged in and belongs to the BIG group under location "alg\ACOMP_user_BIG", will only be able to see BIG in the Marketing Company drop down list. A user that is currently logged in and belongs to the NIS group located under "alg\ACOMP_user_NIS" will only be able to see NIS in the Marketing Company drop down list. Here's a screenshot of the front end: ![web app screenshot](https://i.stack.imgur.com/iP19n.jpg) Here's my best guess (located under Private Sub GetMarketingCompanies() method in default.aspx.vb): ``` If InStr(WindowsIdentity.GetCurrent().Groups = "AMG", item.MarketingCompanyShort = "AMG", CompareMethod.Text) Then marketingCo.Items.Add(String.Format("{0} | {1}", item.MarketingCompanyShort, item.MarketingCompanyName)) For Each item In ac1 marketingCo.Items.Add(String.Format("{0} | {1}", item.MarketingCompanyShort, item.MarketingCompanyName)) Next Catch ex As Exception MsgBox(ex.Message) End Try ``` I've been going off the code from [Wrox's Windows Authentication Tutorial](http://www.wrox.com/WileyCDA/Section/ASP-NET-3-5-Windows-Based-Authentication.id-310905.html) but it's not thorough enough for what I'm trying to do. Web.config file (pertinent code displayed only): ``` <authentication mode="Windows"/> <authorization> <allow users="alg\bmccarthy, alg\phoward" /> <allow roles="alg\ACOMP_user_Admin" /> <allow roles="alg\ACOMP_user_AMG" /> <allow roles="alg\ACOMP_user_BIG" /> <allow roles="alg\ACOMP_user_NIS" /> <allow roles="alg\ACOMP_user_GLA" /> <allow roles="alg\ACOMP_user_PIP" /> <allow roles="alg\ACOMP_user_PSM" /> <allow roles="alg\ACOMP_user_PAM" /> <allow roles="alg\ACOMP_user_ANN" /> <allow roles="alg\ACOMP_user_AAM" /> <allow roles="alg\ACOMP_user_MWM" /> <allow roles="alg\ACOMP_user_GIM" /> <deny users="*" /> </authorization> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IAcompService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://172.17.1.40/aCompService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IAcompService" contract="aComp_ServiceReference.IAcompService" name="BasicHttpBinding_IAcompService" /> </client> </system.serviceModel> ``` default.aspx.vb code w/ the GetMarketingCompanies() and Page_Load() Methods where the application retrieves MarketingCompanies from the webservice and loads it into the dropdownlist through an array: ``` Private Sub GetMarketingCompanies() Try Dim ac1 As Array ac1 = proxy.GetMarketingCompanyNames("acompUser", "acompPass!") ' If InStr(WindowsIdentity.GetCurrent().Groups = "AMG", item.MarketingCompanyShort = "AMG", CompareMethod.Text) Then ' marketingCo.Items.Add(String.Format("{0} | {1}", item.MarketingCompanyShort, item.MarketingCompanyName)) ' if current user role="alg\ACOMP_user_BIG" display BIG MarketingCo.Item ' ' if current user role="alg\ACOMP_user_NIS" display NIS MarketingCo.Item ' ' if current user role="alg\ACOMP_user_GLA" display GLA MarketingCo.Item ' ' if current user role="alg\ACOMP_user_PIP" display PIP MarketingCo.Item ' ' if current user role="alg\ACOMP_user_PSM" display PSM MarketingCo.Item ' ' if current user role="alg\ACOMP_user_PAM" display PAM MarketingCo.Item ' ' if current user role="alg\ACOMP_user_ANN" display ANN MarketingCo.Item ' ' if current user role="alg\ACOMP_user_AAM" display AAM MarketingCo.Item ' ' if current user role="alg\ACOMP_user_MWM" display MWM MarketingCo.Item ' ' if current user role="alg\ACOMP_user_GIM" display GIM MarketingCo.Item ' ' if current user = alg\ACOMP_user_Admin display all marketing companies in drop down list ' For Each item In ac1 marketingCo.Items.Add(String.Format("{0} | {1}", item.MarketingCompanyShort, item.MarketingCompanyName)) Next Catch ex As Exception MsgBox(ex.Message) End Try End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load, Me.Load, Me.Load If Not lbCarriers.Items.Count > 0 Then GetCarriers() GetMarketingCompanies() End If End Sub ``` Default.aspx code where the marketingCo drop down list is defined: ``` <table> <tr> <td class="style3"> Marketing Co (auto-populated): </td> <td bgcolor="#ffffff" class="style8"> <asp:DropDownList ID="marketingCo" runat="server" Height="23px" Width="250px"> </asp:DropDownList> </td> </tr> <td bgcolor="#ffffff" class="style6"> <asp:Button ID="Send_Button" runat="server" Text="Send Invitation" /> </td> </tr> </table> ``` The Web service returns an Array of Strings w/ MarketingCompanyShort and MarketingCompanyName that are added as items to the drop down list Web Service XSD File Code: ``` <xs:element name="ArrayOfMarketingCompany" type="tns:ArrayOfMarketingCompany" nillable="true"/> <xs:complexType name="MarketingCompany"> <xs:sequence> <xs:element name="MarketingCompanyId" type="xs:int" minOccurs="0"/> <xs:element name="MarketingCompanyName" type="xs:string" nillable="true" minOccurs="0"/> <xs:element name="MarketingCompanyShort" type="xs:string" nillable="true" minOccurs="0"/> </xs:sequence> </xs:complexType> ``` Thanks for looking! If you have any helpful links or suggestions, I'll give you an up-vote!
Set Access to dropdownlist items based on the User's Active Directory Group
CC BY-SA 3.0
0
2011-04-20T13:24:48.890
2011-06-07T16:11:31.463
2011-04-26T14:10:19.463
606,805
606,805
[ "asp.net", "vb.net", "web-services", "active-directory", "windows-authentication" ]
5,731,200
1
5,731,490
null
4
2,917
I have chart that can contain a lot of points (10000 +) When I scale the chart in order to see all points in screen, it takes some time to draw them ![Scaled chart](https://i.stack.imgur.com/Ui4o4.png) Can You advice me some optimization, in order not to draw all points
Optimize Chart with 10000+ points
CC BY-SA 3.0
null
2011-04-20T13:36:24.083
2012-07-10T14:36:21.557
null
null
637,449
[ "c#", "math", "optimization", "mschart" ]
5,731,243
1
null
null
0
280
I'm making a multiplayer flash game where at a 'table' more than two players will be playing. Its turn based. Using zendAMF can the server response be made to wait till the player whose turn it is has made his move, so that it will appear to be real time? I don't want to use polling since I read that it is not a very good practice. Instead can this method work? Lets say its player A's turn and the other players B,C,D are waiting. Their flash clients send a request to the server to get any updates. Instead of responding immediately can the server wait till player A has made his move and then send its response containing player A's move details to other players B,C,D? Edit: Added image. This is how the other players waiting players B,C,D are expected to be treated. ![enter image description here](https://i.stack.imgur.com/L0BaD.png)
Is it possible to delay server response in multiplayer game? (edit: Can Long-Polling be done with php and flash)
CC BY-SA 3.0
null
2011-04-20T13:39:08.433
2011-04-28T15:48:22.093
2011-04-28T15:48:22.093
421,080
421,080
[ "flash", "multiplayer", "zend-amf" ]
5,731,284
1
5,731,669
null
1
1,080
Just out of curiosity, I am making an effort to optimize every part of our flex app (which is a small part of our app in general). Currently, I am working on optimizing all of the buttons/skins. I have linked a few of the buttons that I use, and some sample code I am using to generate them. Please advise on how to make this more efficient, usable, and just better overall. Thanks! ![First Button, Icon and gray background](https://i.stack.imgur.com/NqxfK.png)![Second And Third Buttons, different backgrounds but no icons](https://i.stack.imgur.com/qIpwI.png)![Fourth Button, similar to first, different colors](https://i.stack.imgur.com/tqIPK.png)![Button with icons but no background](https://i.stack.imgur.com/OzEtX.png) As you can see, our buttons can be pretty different, but have a similar look and feel. Currently, I am creating 'stateful skins,' by setting up something like this: ``` skin: ClassReference('com.mysite.assets.skins.NavigationButtonSkin'); ``` Then, NavigationButtonSkin looks something like this: ``` public class NavigationButtonSkin extends UIComponent { // imports, constructor, etc protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { // initialize fillColors, fillAlphas, roundedCorners, etc switch( name ){ case 'upSkin': fillColors = [getStyle('backgroundColor'),getStyle('backgroundColor2')]; break; // do the same for overSkin, downSkin, disabledSkin, etc } // use this.graphics to draw background // use this.graphics to draw border on top of background } } ``` I commented out some of the straight forward parts, but let me know if this is a bad/inefficient way of doing this - and how to improve. Thanks!
How to skin buttons in flex 3?
CC BY-SA 3.0
null
2011-04-20T13:41:15.363
2011-04-20T14:55:39.060
null
null
528,576
[ "apache-flex", "actionscript", "adobe", "skins" ]
5,731,419
1
5,731,512
null
2
618
I'm using quartz-2d to do a school project. I have implement a user interface like the following. ![enter image description here](https://i.stack.imgur.com/ky5Ac.png) For example when I touch some area in the menu will draw another picture? Thanks
How to implement touch when using quartz-2d
CC BY-SA 3.0
0
2011-04-20T13:49:27.957
2011-04-20T21:28:19.460
2011-04-20T21:28:19.460
null
null
[ "iphone", "cocoa-touch", "ios", "draw", "quartz-2d" ]
5,731,522
1
5,731,854
null
1
2,297
I want to remove year from iOS date picker. Need to use in iPhone app. ![datepicker example](https://i.stack.imgur.com/nVAPW.jpg)
Remove Year from date picker in iPhone/iOS app
CC BY-SA 3.0
0
2011-04-20T13:58:04.467
2011-04-20T14:20:55.837
2011-04-20T14:06:50.417
256,728
717,257
[ "iphone", "cocoa-touch" ]
5,731,612
1
5,731,664
null
3
888
I am trying to add primary keys to my tables, via Sequel Pro and it said "This table currently does not support relations. Only tables that use the InnoDB storage engine support them." I went into phpMyAdmin and looked at the storage engines and saw InnoDB listed, highlighted in blue, then I selected it and it displayed this info: [http://cl.ly/68Ph](http://cl.ly/68Ph) ![enter image description here](https://i.stack.imgur.com/DxpAl.png) It is enabled, but I am unsure how to implement it to my existing database, any help is appreciated.
need help implementing InnoDB storage engine to existing database
CC BY-SA 3.0
null
2011-04-20T14:05:03.160
2011-04-20T14:08:59.607
null
null
26,130
[ "mysql", "database", "phpmyadmin", "innodb" ]
5,731,718
1
5,731,793
null
0
103
I am trying to set up some project in Eclipse which is already developed and has following file structure. ![Root Folder Files](https://i.stack.imgur.com/hHBqo.png) ![WEB-INF Files](https://i.stack.imgur.com/hAHP9.png) I know how to setup things in Eclipse and how to run it with Apache Tomcat but when I restart Tomcat it tries to build the web app with tons of errors. The errors are like failed to load libraries (.JAR) and the like. Let me tell you the project is loaded and set in Eclipse perfectly without any single Error. There are many packages in the project as well as JSP files. Why this is not working with Tomcat?
Setting Up Developed Java Project in Eclipse
CC BY-SA 3.0
null
2011-04-20T14:12:04.327
2011-04-21T14:19:38.783
null
null
355,507
[ "java", "servlets", "tomcat" ]
5,731,846
1
null
null
0
220
Could someone recommend a jQuery menu plugin, looks like the picture below. I need to open all tabs by default, but also can collapse a tab on demand. ![enter image description here](https://i.stack.imgur.com/l7Eoy.png)
Please recommend a jQuery menu plugin
CC BY-SA 3.0
null
2011-04-20T14:20:21.470
2011-04-20T14:36:52.433
null
null
404,264
[ "javascript", "jquery", "css" ]
5,731,935
1
5,732,226
null
1
3,674
I have an existing MVC3 project (upgraded from MVC2 about 3 months ago) and then added Glimpse via NuGet yesterday. When I ran (hit F5) it, and go to [http://localhost:8888/Glimpse/Config](http://localhost:8888/Glimpse/Config) what I got is error for "Server Error in '/' Application" - The resource cannot be found. ![enter image description here](https://i.stack.imgur.com/56GF2.png) I have tried creating a brand new MVC3 project and adding Glimpse via NuGet in there and it works. My global.asax is exactly the same line by line and so is my web.config. According to ELMAH, the dll for Glimpse is found and executed properly, but since it's not inheriting from IController so it breaks. Here is a screen shot from ELMAH: ![enter image description here](https://i.stack.imgur.com/SBomG.png) Any hints?
Getting "The resource cannot be found. " error trying to load Glimpse
CC BY-SA 3.0
null
2011-04-20T14:25:14.773
2011-07-03T17:35:46.970
null
null
75,800
[ "asp.net-mvc-3", "glimpse" ]
5,732,166
1
5,734,080
null
3
1,507
How do I loop through all items and sub items of a IContextMenu and list all available verbs? So far, I have this working code extracted from JCL: ``` function DisplayContextMenuPidl(const Handle: THandle; const Folder: IShellFolder; Item: PItemIdList; Pos: TPoint): Boolean; var Cmd: Cardinal; ContextMenu: IContextMenu; ContextMenu2: IContextMenu2; Menu: HMENU; CommandInfo: TCMInvokeCommandInfo; CallbackWindow: THandle; vteste : string; begin Result := False; if (Item = nil) or (Folder = nil) then Exit; Folder.GetUIObjectOf(Handle, 1, Item, IID_IContextMenu, nil, Pointer(ContextMenu)); if ContextMenu <> nil then begin Menu := CreatePopupMenu; if Menu <> 0 then begin if Succeeded(ContextMenu.QueryContextMenu(Menu, 0, 1, $7FFF, CMF_EXPLORE)) then begin CallbackWindow := 0; if Succeeded(ContextMenu.QueryInterface(IContextMenu2, ContextMenu2)) then begin CallbackWindow := CreateMenuCallbackWnd(ContextMenu2); end; ClientToScreen(Handle, Pos); Cmd := Cardinal(TrackPopupMenu(Menu, TPM_LEFTALIGN or TPM_LEFTBUTTON or TPM_RIGHTBUTTON or TPM_RETURNCMD, Pos.X, Pos.Y, 0, CallbackWindow, nil)); if Cmd <> 0 then begin ResetMemory(CommandInfo, SizeOf(CommandInfo)); CommandInfo.cbSize := SizeOf(TCMInvokeCommandInfo); CommandInfo.hwnd := Handle; CommandInfo.lpVerb := MakeIntResourceA(Cmd - 1); CommandInfo.nShow := SW_SHOWNORMAL; Result := Succeeded(ContextMenu.InvokeCommand(CommandInfo)); end; if CallbackWindow <> 0 then DestroyWindow(CallbackWindow); end; DestroyMenu(Menu); end; end; end; ``` This code works fine and it shows the context menu. I need to adapt it so it can list (maybe a log file) all the menu verbs. To clarify lets assume I have this context menu: ![enter image description here](https://i.stack.imgur.com/5KZwo.gif) I want to log something like this: ## Item verb open= open properties= properties send to= sendto send to bluetooh= xxx If somebody has another way of getting the verbs or call a item by its display text I would also appreciate it.
Loop through IContextMenu
CC BY-SA 3.0
0
2011-04-20T14:41:07.750
2011-04-20T23:19:14.343
2011-04-20T17:03:50.297
528,211
528,211
[ "delphi", "shell-extensions" ]
5,732,323
1
5,735,582
null
4
1,757
As a somewhat similar to a problem I had before and posted before, I'm trying to get normals to display correctly in my GLSL app. For the purposes of my explanation, I'm using the ninjaHead.obj model provided with RenderMonkey for testing purposes ([you can grab it here](http://www.filehosting.org/file/details/221306/ninjaHead.obj)). Now in the preview window in RenderMonkey, everything looks great: ![RenderMonkey](https://i.stack.imgur.com/UJgGl.png) and the vertex and fragment code generated respectively is: Vertex: ``` uniform vec4 view_position; varying vec3 vNormal; varying vec3 vViewVec; void main(void) { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; // World-space lighting vNormal = gl_Normal; vViewVec = view_position.xyz - gl_Vertex.xyz; } ``` Fragment: ``` uniform vec4 color; varying vec3 vNormal; varying vec3 vViewVec; void main(void) { float v = 0.5 * (1.0 + dot(normalize(vViewVec), vNormal)); gl_FragColor = v* color; } ``` I based my GLSL code on this but I'm not quite getting the expected results... My vertex shader code: ``` uniform mat4 P; uniform mat4 modelRotationMatrix; uniform mat4 modelScaleMatrix; uniform mat4 modelTranslationMatrix; uniform vec3 cameraPosition; varying vec4 vNormal; varying vec4 vViewVec; void main() { vec4 pos = gl_ProjectionMatrix * P * modelTranslationMatrix * modelRotationMatrix * modelScaleMatrix * gl_Vertex; gl_Position = pos; gl_TexCoord[0] = gl_MultiTexCoord0; gl_FrontColor = gl_Color; vec4 normal4 = vec4(gl_Normal.x,gl_Normal.y,gl_Normal.z,0); // World-space lighting vNormal = normal4*modelRotationMatrix; vec4 tempCameraPos = vec4(cameraPosition.x,cameraPosition.y,cameraPosition.z,0); //vViewVec = cameraPosition.xyz - pos.xyz; vViewVec = tempCameraPos - pos; } ``` My fragment shader code: ``` varying vec4 vNormal; varying vec4 vViewVec; void main() { //gl_FragColor = gl_Color; float v = 0.5 * (1.0 + dot(normalize(vViewVec), vNormal)); gl_FragColor = v * gl_Color; } ``` However my render produces this... ![openGL render](https://i.stack.imgur.com/6ghhX.png) Does anyone know what might be causing this and/or how to make it work? In response to kvark's comments, here is the model rendered without any normal/lighting calculations to show all triangles being rendered. ![Render flat shading](https://i.stack.imgur.com/7d1UZ.png) And here is the model shading with the normals used for colors. I believe the problem has been found! Now the reason is why it is being rendered like this and how to solve it? Suggestions are welcome! ![Normal shading](https://i.stack.imgur.com/BzqyD.png) Well everyone the problem has been solved! Thanks to kvark for all his helpful insight that has definitely helped my programming practice but I'm afraid the answer comes from me being a MASSIVE tit... I had an error in the display() function of my code that set the glNormalPointer offset to a random value. It used to be this: ``` gl.glEnableClientState(GL.GL_NORMAL_ARRAY); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, getNormalsBufferObject()); gl.glNormalPointer(GL.GL_FLOAT, 0, getNormalsBufferObject()); ``` But should have been this: ``` gl.glEnableClientState(GL.GL_NORMAL_ARRAY); gl.glBindBuffer(GL.GL_ARRAY_BUFFER, getNormalsBufferObject()); gl.glNormalPointer(GL.GL_FLOAT, 0, 0); ``` So I guess this is a lesson. NEVER mindlessly Ctrl+C and Ctrl+V code to save time on a Friday afternoon AND... When you're sure the part of the code you're looking at is right, the problem is probably somewhere else!
Odd effect with GLSL normals
CC BY-SA 3.0
0
2011-04-20T14:51:41.217
2011-11-24T10:47:46.477
2011-11-24T10:47:46.477
877,097
410,921
[ "opengl", "glsl", "normals" ]
5,732,836
1
5,734,821
null
45
67,588
I'm trying to create an ordered list in CSS + HTML that looks like this: ![CSS List Example](https://i.stack.imgur.com/MI1Kh.png) I can't for the life of me figure out how to do this. I've tried using `list-image` but then the numerals don't appear. I tried setting a background, but it won't appear behind the number if `list-style-position` is set to `outside`. I tried setting it with a background and `list-style-position: inside`, then putting the text inside the `li` in a `div` to align it, but no combination of floats, margins, etc worked without wrapping around the numeral. This seems like something I've seen on plenty of web sites, but at the moment I can't seem to find a working example, nor is Googling for this giving me any results. So, can anyone help me with this? How would you create the above using HTML+CSS, ideally without using JS, and definitely without using just images. This text needs to be selectable and copy/pasteable. Because a commenter asked, here's the markup I have right now: ``` <ol> <li><span>List item one.</span></li> <li><span>List item two.</span></li> <li><span>List item three.</span></li> </ol> ``` None of the CSS I've tried has even come close to working, so I'm not sure the value of sharing what I have currently. Here's one version that failed... ``` ol { display: block; list-style: decimal outside url('/images/lists/yellow-circle-18px.png'); } ol li { width: 176px; margin-right: 20px; float: left; } ol li span { display: block; } ```
HTML + CSS: Numbered list with numbers inside of circles
CC BY-SA 3.0
0
2011-04-20T15:28:44.030
2022-12-09T14:34:04.877
2015-03-23T00:08:30.400
1,118,321
417,872
[ "html", "css", "geometry", "html-lists" ]
5,732,983
1
5,743,499
null
2
3,363
I have a Firebird database which stores Uuid values in a char(16) field. In my C# program, I need to retrieve these values in order to use them in subsequent queries. But the values I get back from the database are "garbage". (e.g. `¿ñ)êNµmÏc—ÝX`) I've tried various methods of reading the data as a byte array and using that to create a local `Guid`, but that hasn't gotten me anywhere. The closest I've gotten was by using `Encoding.ASCII.GetBytes()` which did give me a "valid" guid, however it doesn't match the "real" guids in the database. I know they don't match because (1) the database has a UDF which converts the 'garbage' into a human readable string and (2) when I manually copy that human readable guid into my application, using it to create a new local `Guid`, and use THAT value in my queries, I get the correct results. (Whereas guids created from byte arrays do not yield correct results.) I also tried `IDataRecord.GetBytes()` but that resulted in an InvalidCastException ("Unable to cast object of type 'System.String' to type 'System.Byte[]'.") This application uses databases created by another, unrelated product and I have no control over its structure, nor can I use things like stored procedures. I also cannot use the UDF's I mentioned earlier because they are going bye-bye soon. The available UDF's apparently are simple wrappers around [UuidToString](http://msdn.microsoft.com/en-us/library/aa379352%28v=vs.80%29.aspx) and [UuidFromString](http://msdn.microsoft.com/en-us/library/aa379336%28VS.85%29.aspx). I suppose I use those functions in my own code, but I'd rather not if there's another way that doesn't involve interop. Ultimately, the I need the guid to work in a method that looks something like this: ``` protected DataTable QueryDataTable(string query, string paramName, Guid guid) { DataTable table = new DataTable(); IDbCommand command = CreateDbCommand(query); if (command is FbCommand) { FbCommand fbCommand = (FbCommand)command; fbCommand.Parameters.Add(paramName, FbDbType.Binary).Value = guid.ToByteArray(); // Also tried passing in the byte[] generated by // Encoding.Ascii.GetBytes.... didn't work. //fbCommand.Parameters.Add(paramName, FbDbType.Binary).Value = guid; FbDataAdapter adapter = new FbDataAdapter(fbCommand); adapter.Fill(table); } return table; } ``` Questions: (1) Why isn't my tactic of using a byte array to create a guid resulting in a "correct" guid? (2) What other tactics might I use to extract these guids and store them as locally as such? Thanks! ## Edit: Here's an example of what I've got in front of me. From the database: ![enter image description here](https://i.stack.imgur.com/jZwkj.png) Resulting char array from the garbage string: ![enter image description here](https://i.stack.imgur.com/1zOd7.png) Using the tactic suggested by @Alexei Levenkov, the resulting guid (1) is very close but not exactly correct (2). (1): `fca3120b-511e-4269-b88f-d053a34b3513` (2): `fca3120b-5184-4269-b88f-d053a34b3596` SOME garbage strings do turn out correctly, but this is an example of one that does not. This is how I'm implementing Alexei's suggestion, as I didn't see a Select method for strings: ``` // table is a DataTable List<byte> bytes = new List<byte>(); string blah = (string)table.Rows[0][0]; foreach (char c in blah.ToCharArray()) { bytes.Add((byte)c); } Guid guid = new Guid(bytes.ToArray()); ```
How to parse a Uuid stored as a char(16)?
CC BY-SA 3.0
null
2011-04-20T15:37:57.253
2013-06-11T14:50:47.613
2011-04-20T18:13:29.363
300,212
300,212
[ "c#", "sql", "guid", "firebird" ]
5,733,182
1
null
null
0
1,634
I downloaded the latest XCode 3 days ago. I am trying to add the iAd Framework to my current project. I go to target, then "link with libraries", click on "+" and have a list of frameworks. But can't find any iad framework in that list? See screenshot here: ![screenshot](https://i.stack.imgur.com/XGfTv.png) [http://i.stack.imgur.com/4Kn8F.png](https://i.stack.imgur.com/4Kn8F.png) Any idea why? Thank you a lot!
iAd framework missing in XCode
CC BY-SA 3.0
null
2011-04-20T15:56:04.013
2011-12-01T03:45:21.743
2011-12-01T03:45:21.743
234,976
717,471
[ "ios", "frameworks", "iad" ]
5,733,840
1
5,871,566
null
2
2,127
Am I crazy or is it not possible to close other tabs in XCode 4? I have about 7 tabs opened littering my workspace. I right click the one tab I'm interested in to bring up the context menu. I can see options to open a "new tab", "close tab", "close other tabs", and "move tab to new window". However, the only option that is not greyed out is "new tab". Do I have to put XCode in some magical state to enable the other options? Are these options merely eye candy, teasing me with hopes and aspirations of things I might like to do? Is this some weird kind of year long April fools gag? Inquiring minds wanna know. ![enter image description here](https://i.stack.imgur.com/2bDi0.png)
Close Other tabs in XCode 4?
CC BY-SA 3.0
0
2011-04-20T16:51:03.740
2013-04-09T10:16:54.253
2011-05-04T18:12:06.410
10,631
10,631
[ "xcode4" ]
5,733,820
1
12,350,636
null
13
5,853
I've created a code snippet in VS2010. It isn't showing as a shortcut when I start typing. I've called it propnch. It is available when I use Ctrl-K, Ctrk-X but when I just start typing prop... it isn't showing as an option. Have I missed some kind of setting somewhere? I had screen shots, but I don't think SO lets you upload any. I can see my snippet with Ctrl-K, Ctrl-X (its gone grey when I ctrl-PrtScn to take the screenshot) ![enter image description here](https://i.stack.imgur.com/8YMJ3.png) But It doesn't appear with the other snippet shortcuts. ![enter image description here](https://i.stack.imgur.com/XT6P4.png) The snippet code is here (taken from [this tutorial](http://www.codeproject.com/Articles/96088/Code-Snippet-in-Visual-Studio.aspx)) and is in the "Documents\Visual Studio 2010\Code Snippets\Visual C#\My Code Snippets" folder. ``` <?xml version="1.0" encoding="utf-8" ?> <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> <CodeSnippet Format="1.0.0"> <Header> <Title>propnch</Title> <Shortcut>propnch</Shortcut> <Description>Code snippet for property and backing field and ensure that it invokes INotifyPropertyChanigng and INotifyPropertyChanged</Description> <Author>Abhishek</Author> <SnippetTypes> <SnippetType>Expansion</SnippetType> </SnippetTypes> </Header> <Snippet> <Declarations> <Literal> <ID>type</ID> <ToolTip>Property type</ToolTip> <Default>int</Default> </Literal> <Literal> <ID>property</ID> <ToolTip>Property name</ToolTip> <Default>MyProperty</Default> </Literal> <Literal> <ID>field</ID> <ToolTip>The variable backing this property</ToolTip> <Default>myVar</Default> </Literal> </Declarations> <Code Language="csharp"><![CDATA[ private $type$ $field$; public $type$ $property$ { get { return $field$; } set { this.OnPropertyChanging("$property$"); $field$ = value; this.OnPropertyChanged("$property$"); } } $end$]]> </Code> </Snippet> </CodeSnippet> ```
VS2010 Code Snippet Shortcut Not Showing
CC BY-SA 3.0
0
2011-04-20T16:49:35.957
2017-02-24T18:22:18.083
2012-07-12T16:08:47.940
229,044
286,231
[ "visual-studio-2010", "code-snippets" ]
5,734,069
1
null
null
0
591
I am wondering to know how it can be possible to remove the tags from output string in PHP. At the time of input It can be removed by `strip_tags()` that I know but From already generated output where html tags appeared, How it can be removed ? : ``` <p>Test paragraph.</p> <a href="#fragment">Other text</a> ``` ![enter image description here](https://i.stack.imgur.com/Q6xXG.png) I have pointed what i am getting from database. Its like static text. This is the output string appearing in my blog description. I want to remove html tags from the string. How can i be removed. Sorry For poor english Any Help will be greatly appreciated. ThankYou
how to Remove <a> and all other html tags from tha output string not at the time of input string in PHP?
CC BY-SA 3.0
null
2011-04-20T17:11:43.553
2011-04-20T17:42:31.857
2011-04-20T17:42:31.857
445,646
445,646
[ "php", "html", "string", "tags" ]
5,734,130
1
6,105,341
null
7
10,007
I am getting the following error whenever I try to install my Cocos2d game on an iPhone device. Failed to get the task for process 1640 I am using xCode 4.0.2 which I really hate as it is simply too complicated. I have set the build settings for my target but when I click on the project it says no build settings have been configured as shown in the screenshot below: ![enter image description here](https://i.stack.imgur.com/DuUgW.png) Although the app fails to run on the device but when I use my iPhone and click on the app it does run without using xCode.
Failed to get the task for process 1640. Error when trying to run iPhone app on device
CC BY-SA 3.0
null
2011-04-20T17:16:11.353
2012-02-23T16:53:40.980
2011-05-24T04:25:05.977
257,550
3,797
[ "iphone", "xcode4" ]
5,734,350
1
5,942,846
null
9
13,454
# What I'm doing I started playing around with Xilinx ISE Design Suite and wrote simple Arithmetical Logic Units in verilog. Using verilog Unit Under Tests to create input and output signals for ISim, I verified, that the code works just as I want it. I would like to generate schematic file from the verilog source. Under tools menu, there is a schematic viewer ![enter image description here](https://i.stack.imgur.com/39mvP.png) , but I can not figure out, why: - - # Question: How to generate schematic file from verilog source in Xilinx?
How to generate schematic file from verilog source in Xilinx
CC BY-SA 3.0
0
2011-04-20T17:38:01.527
2015-01-23T13:20:46.783
2020-06-20T09:12:55.060
-1
97,754
[ "verilog", "xilinx" ]
5,734,403
1
5,734,441
null
1
207
was followin this tutorial [http://code.google.com/intl/et-EE/webtoolkit/usingeclipse.html](http://code.google.com/intl/et-EE/webtoolkit/usingeclipse.html) when i run my program in browser by IP , the application works ![enter image description here](https://i.stack.imgur.com/RfWhm.png) but when i compile it and run it in producution mode, it says that server isn't running ![enter image description here](https://i.stack.imgur.com/ksbMW.png) anyone knows the solution? or what i am doing wrong? server i think is jetty, it comes with GWT by default ``` Initializing AppEngine server Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger Successfully processed C:\Users\Jansu\Documents\workspace\gtw-test\war\WEB-INF/appengine-web.xml Successfully processed C:\Users\Jansu\Documents\workspace\gtw-test\war\WEB-INF/web.xml The server is running at http://localhost:8888/ ```
GWT get started eclipse problem
CC BY-SA 3.0
null
2011-04-20T17:43:05.457
2011-07-08T11:16:53.523
2011-04-20T17:59:37.173
625,189
625,189
[ "eclipse", "gwt" ]
5,734,623
1
5,734,827
null
5
650
![Design #1](https://i.stack.imgur.com/H1T18.png) ![Design #2](https://i.stack.imgur.com/hZJ2s.png) Which Design supports overall low coupling? and why?
Which design supports low coupling?
CC BY-SA 3.0
null
2011-04-20T18:02:01.320
2011-04-20T18:51:54.070
2011-04-20T18:27:55.320
478,636
478,636
[ "design-patterns", "coupling" ]
5,734,717
1
5,734,956
null
1
976
In a project I need to make headings like this and I want to use with less image and markup because Texture will be the same but Gradient are different in different sections. I have 3 things in heading. 1. Heading text 2. A texture over the gradient and under the heading text 3. A gradient behind the texture like this in a combined form ![enter image description here](https://i.stack.imgur.com/7Td26.jpg) I'm only considering Web-Kit based browsers. I can make gradient with CSS. I can put heading text and can add shadow in css. I want to make this thing without using any image or less image. So question is, Is it possible to make texture in css and If it's not possible then what is the best Semantic way to achive this heading with one transparent texture image? I want to make this with this code ``` <h1> Heading Level 1 </h1> ``` So using CSS can i use 2 backgrounds 1) gradient made by css and 2) on the top of the gradient I want to put transparent image of texture with `repeat-x` And If we can't put background in layers then what other way you would suggest? Will I have to use with extra `span` and `z-index`
How to use two backgrounds for one element and put second background on top of first?
CC BY-SA 3.0
0
2011-04-20T18:10:21.393
2011-04-20T18:39:39.927
2011-04-20T18:26:11.217
84,201
84,201
[ "webkit", "css", "semantic-markup" ]
5,734,971
1
5,826,735
null
0
805
I'm using eclipse 3.6.1 and WTP 3.2.3 on centOS 5.5. I have this issue where my expression values are showing up as blank when stepping through a jsp page (see screenshot)![screenshot](https://i.stack.imgur.com/g4BGq.png). The same objects appear fine in the variables pane. I tried to see if I there was setting that might be impacting this behavior but didn't see anything. Has anyone else run into this issue?
Issue with Expressions when debugging JSP pages
CC BY-SA 3.0
null
2011-04-20T18:33:44.667
2011-05-14T14:07:39.990
2011-05-14T14:07:39.990
560,648
549,226
[ "eclipse", "jsp", "eclipse-wtp" ]
5,735,221
1
5,735,267
null
4
3,201
I was playing with corners, and I was intrigued with this behavior. XML layout: ``` <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_header_title" android:layout_height="wrap_content" android:layout_width="fill_parent" android:padding="10dip" android:gravity="center_vertical" android:background="@layout/my_outline" android:text="Example" android:textSize="14sp" android:textStyle="bold" /> ``` This is my_outline.xml: ``` <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:topLeftRadius="10dip" android:bottomRightRadius="10dip"/> <padding android:left="50dip" android:top="5dip" android:bottom="5dip" /> <solid android:color="#0fff" /> <stroke android:width="1dip" android:color="#f0f0f0" /> </shape> ``` Picture: ![enter image description here](https://i.stack.imgur.com/FKSb6.png) Change the shape to: ``` <corners android:topLeftRadius="10dip" android:bottomLeftRadius="10dip"/> ``` And you can clearly see that the bottom corners are inverted (happens with all, i cut "Wednesday" just to illustrate). This is a picture of my phone (Nexus S 2.3.2, but happens on the emulator as well): ![enter image description here](https://i.stack.imgur.com/nuPRZ.png) Are you aware of this? I looked at Google ("android shape inverted corner"), and got nothing. Here on SO there are no "related questions" as well.
Android: Shape "corners" problem. Is this a bug?
CC BY-SA 3.0
null
2011-04-20T18:55:29.697
2011-04-20T19:00:21.997
2011-04-20T18:56:27.397
27,615
489,607
[ "android", "rounded-corners", "shapes" ]
5,735,269
1
null
null
24
17,132
Error when trying to display the form designer. ![enter image description here](https://i.stack.imgur.com/gl13f.jpg) ``` public partial class frmCanalVenda : frmEdit { public frmCanalVenda(CanalVenda canal, Cliente cli) : base(canal) { InitializeComponent(); bdsCliente.DataSource = cli; eabBar.ReadOnlyView = false; } private void frmCanalVenda_Load(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; bdsAgrupamento.DataSource = Agrupamento.GetAll(DatabaseAFV.Connection); bdsCanal.DataSource = Canal.GetAll(DatabaseAFV.Connection); bdsSubCanal.DataSource = SubCanal.GetAll(DatabaseAFV.Connection); bdsEspecializacao.DataSource = Especializacao.GetAll(DatabaseAFV.Connection); bdsOperacao.DataSource = Operacao.GetAll(DatabaseAFV.Connection); bdsPorte.DataSource = Porte.GetAll(DatabaseAFV.Connection); } finally { Cursor.Current = Cursors.Default; } } } ``` > To prevent possible data loss before loading the designer, the following errors must be resolved: Value does not fall within the expected range. Instances of this error (1) 1. Hide Call Stack at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.VisualStudio.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure) at Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService.GetFileDocData(String fileName, FileAccess access, String createTemplate, Boolean addToHostList, Boolean nestedItem) at Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService.GetChildDocData(String name, FileAccess access, String createTemplate) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.GetResourceDocData(CultureInfo info, FileAccess access) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.System.ComponentModel.Design.IResourceService.GetResourceReader(CultureInfo info) at System.ComponentModel.Design.Serialization.ResourceCodeDomSerializer.SerializationResourceManager.GetMetadata() at System.ComponentModel.Design.Serialization.ResourceCodeDomSerializer.SerializationResourceManager.GetMetadataEnumerator() at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertiesFromResources(IDesignerSerializationManager manager, Object value, Attribute[] filter) at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
Value does not fall within the expected range
CC BY-SA 3.0
0
2011-04-20T19:00:29.230
2021-10-27T14:39:24.883
2011-04-20T19:36:14.347
491,181
491,181
[ "visual-studio-2008", "forms", "c#-3.0", "compact-framework", "windows-mobile-6.1" ]
5,735,327
1
null
null
0
3,853
I have a little problem with my owc chartspace, I would like to draw a chart like in the picture but my problem is that it draws only for one series I would like to draw it for the 1 the 2 and the 3 I don't know how to do this. I have a listbox and a combobox, I select from the list box the 1,2,3 and I select from the combobx y or z such that x is fixed. Then I put the data in plage(1) for x and plage(2) for y but the problem is that it works only for the first item I select from the listbox ( in this picture the "1" ) Could you tell what is wrong in my code? ![enter image description here](https://i.stack.imgur.com/gTNMb.jpg) the vba code for drawing the chart into the userform is: ``` Private Sub drow() Dim i, k As Integer, x As Integer Dim j As Integer Dim Table(), Plage(2) Dim id As Integer id = 1 Do While ComboBox.Value <> idi(id, 1) id = id + 1 Loop For i = Cht.SeriesCollection.Count To 1 Step -1 Cht.SeriesCollection.Delete i - 1 Next i k = 1 ReDim Table(ListBox.ListCount) For i = 0 To ListBox.ListCount - 1 If ListBox.Selected(i) = True Then Table(k) = ListBox.List(i) k = k + 1 End If Next i With Cht .HasLegend = True .Legend.Position = chLegendPositionBottom .HasTitle = True .Title.Caption = ComboBox.Text End With Cht.Type = C.chChartTypeColumnClustered3D With Cht 'first serie .SeriesCollection.Add .SeriesCollection(0).Caption = sheet.Cells(2, 15 + id) .SeriesCollection(0).DataLabelsCollection.Add .SeriesCollection(0).DataLabelsCollection(0).Position = chLabelPositionCenter .SeriesCollection(0).DataLabelsCollection(0).Font.Color = RGB(255, 255, 255) .SeriesCollection.Add .SeriesCollection(1).Caption = sheet.Cells(2, 20) .SeriesCollection(1).DataLabelsCollection.Add .SeriesCollection(1).DataLabelsCollection(0).Position = chLabelPositionCenter .SeriesCollection(1).DataLabelsCollection(0).Font.Color = RGB(255, 255, 255) .SetData C1.chDimCategories, C1.chDataLiteral, Table End With For j = 0 To ListBox.ListCount - 1 If ListBox.Selected(j) = True Then Plage(1) = sheet.Cells(j + 3, 15 + id) 'the Xs Plage(2) = sheet.Cells(j + 3, 20) 'Les 'the Ys With Cht .SeriesCollection(0).SetData C1.chDimValues, C1.chDataLiteral, Plage(1) .SeriesCollection(1).SetData C1.chDimValues, C1.chDataLiteral, Plage(2) End With Erase Plage End If Next j End Sub ```
Drawing a chart with owc chartspace in userform vba excel
CC BY-SA 3.0
null
2011-04-20T19:04:45.893
2011-05-13T10:14:24.990
2018-07-09T19:34:03.733
-1
328,256
[ "excel", "vba" ]
5,735,651
1
null
null
2
1,704
I have an asp.net form with a textarea element (part of member profile - Objectives field). I don't mind users entering html tags in there, but asp.net doesn't allow submitting html tags inside text boxes for security reasons (), which is good. So, I see two options - strip html tags completely from textarea's value before form submission, or escape textarea's value, replacing `<` and `>` with `&lt;` and `&gt;` before submitting to the server. In other words, if someone typed following in the textarea: ![enter image description here](https://i.stack.imgur.com/Rez5i.png) I want to somehow save it on the server and show it to the user exactly as they typed it next time they are on that page. How is such a problem usually handled? UPDATE: Asp.net doesn't allow you to submit tags in the input/textarea elements by default. And if I disable that check, I open a potential for XSS exploits. All I want is to find a correct way to escape input (and assign back to the element) and then be able to unescape it after the form loads
How to correctly handle html tags in textarea
CC BY-SA 3.0
0
2011-04-20T19:33:46.190
2013-08-14T00:53:20.883
2013-08-14T00:53:20.883
1,113,772
151,200
[ "javascript", "asp.net", "escaping", "textarea", "xss" ]
5,735,786
1
5,735,893
null
11
10,368
One part of web development (from a front-end perspective) is laying out forms. There is never a standard set, and I've seen people continuing to use `<tables>` to keep styling consistent. Say you were to lay out this form: ![enter image description here](https://i.stack.imgur.com/2L4Es.png) At first glance it seems that a table would make laying out this form easy. Another options is to use `<fieldset>`'s, with perhaps a list inside them. Float the fieldsets to the left, give them equal widths. My question is There seem to be several techniques, but many of them don't work cross browser. How would do it? And why?
Standards for laying out and designing forms (HTML/CSS)
CC BY-SA 3.0
0
2011-04-20T19:47:29.487
2012-07-05T18:12:40.407
2012-03-11T08:29:57.023
106,224
396,956
[ "html", "css", "forms" ]
5,735,806
1
5,736,060
null
0
508
I am trying to create a new BST from the intersection of 2 known BSTs. I am getting a NullPointerException in the intersect2 method int he second case, at the line "cur3.item.set_account_id(cur1.item.get_accountid()+ cur2.item.get_accountid());". I know you get the error when you try to dereference the variable without initializing it but i think i am initializing it? I'm not really sure. I would appreciate the help. ``` public static Bst<Customer> intersect(Bst<Customer> a, Bst<Customer> b){ return( intersect2(a.root, b.root)); } public static Bst<Customer> intersect2(BTNode<Customer> cur1, BTNode<Customer> cur2){ Bst<Customer> result = new Bst<Customer>(); // 1. both empty -> true if (cur1==null && cur2==null){ result=null; } // 2. both non-empty -> compare them else if (cur1!=null && cur2!=null) { BTNode<Customer> cur3 = new BTNode<Customer>(); cur3.item.set_account_id(cur1.item.get_accountid()+ cur2.item.get_accountid()); result.insert(cur3.item); intersect2(cur1.left, cur2.left); intersect2(cur1.right, cur2.right); } // 3. one empty, one not -> false else if (cur1==null ||cur2==null){ BTNode<Customer> cur3 = new BTNode<Customer>(); cur3.item=null; intersect2(cur1.left, cur2.left); intersect2(cur1.right, cur2.right); } return result; } ``` Here is the image of the problem: ![enter image description here](https://i.stack.imgur.com/j6pKT.png)
BST intersection, NullPointerException
CC BY-SA 3.0
null
2011-04-20T19:49:15.367
2011-04-20T21:27:03.347
2011-04-20T21:00:56.037
530,955
530,955
[ "java", "binary-search-tree" ]
5,736,106
1
5,736,275
null
1
2,558
I successfully integrated a FaceBook application into my project (the regular FaceBook page where you post something on your wall): ![enter image description here](https://i.stack.imgur.com/9Ynfk.png) But I was wondering if someone can help me out how to get a facebook fan page or like page on this? I dont wan't publish story "Post To Your Wall" and entering message, I just want user to get that fan page a 'Like' button and gets status updates (no post to fan page yet). Hope someone can help me out, thanks.
How to create a Facebook Like or Fan page?
CC BY-SA 3.0
null
2011-04-20T20:16:25.580
2014-08-18T18:44:58.907
2014-08-18T18:44:58.907
64,046
616,482
[ "ios", "facebook-graph-api", "facebook-ios-sdk" ]
5,736,589
1
5,736,934
null
1
700
``` Public Class Form1 Private Sub But_Bell_Click(sender As System.Object, e As System.EventArgs) Handles But_Bell.Click MessageBox.Show("Ding a ling") End Sub ``` End Class ``` Public Class BellsAndWhistles Inherits Form1 Friend WithEvents But_Whistle As System.Windows.Forms.Button Private Sub InitializeComponent() Me.But_Whistle = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'But_Whistle ' Me.But_Whistle.Location = New System.Drawing.Point(112, 38) Me.But_Whistle.Name = "But_Whistle" Me.But_Whistle.Size = New System.Drawing.Size(75, 23) Me.But_Whistle.TabIndex = 1 Me.But_Whistle.Text = "Whistle" Me.But_Whistle.UseVisualStyleBackColor = True ' 'BellsAndWhistles ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.ClientSize = New System.Drawing.Size(292, 273) Me.Controls.Add(Me.But_Whistle) Me.Name = "BellsAndWhistles" Me.Text = "Bells & Whistles" Me.Controls.SetChildIndex(Me.But_Whistle, 0) Me.ResumeLayout(False) End Sub Private Sub But_Whistle_Click(sender As System.Object, e As System.EventArgs) Handles But_Whistle.Click MessageBox.Show("Toot Toot") End Sub ``` End Class ![First Decendent Designer](https://i.stack.imgur.com/JZ9qU.jpg) ``` Public Class MoreBellsAndWhistles Inherits BellsAndWhistles Friend WithEvents MoreBells As System.Windows.Forms.Button Private Sub InitializeComponent() Me.MoreBells = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'MoreBells ' Me.MoreBells.Location = New System.Drawing.Point(30, 145) Me.MoreBells.Name = "MoreBells" Me.MoreBells.Size = New System.Drawing.Size(75, 23) Me.MoreBells.TabIndex = 1 Me.MoreBells.Text = "More Bells" Me.MoreBells.UseVisualStyleBackColor = True ' 'MoreBellsAndWhistles ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.ClientSize = New System.Drawing.Size(292, 273) Me.Controls.Add(Me.MoreBells) Me.Name = "MoreBellsAndWhistles" Me.Text = "MoreBellsAndWhistles" Me.Controls.SetChildIndex(Me.MoreBells, 0) Me.ResumeLayout(False) End Sub Private Sub MoreBells_Click(sender As System.Object, e As System.EventArgs) Handles MoreBells.Click MessageBox.Show("Ting TIng") End Sub Private Sub MoreBellsAndWhistles_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load End Sub ``` End Class ![Second Descendant Designer](https://i.stack.imgur.com/CpgKg.jpg) Where has the whistle button gone? The class part of the inheritance has works because you can access it via code.
Inheritance works for first descendant but not next. Why?
CC BY-SA 3.0
null
2011-04-20T21:00:49.870
2011-04-21T13:27:44.157
null
null
597,539
[ "vb.net", "forms", "inheritance" ]
5,736,609
1
5,739,898
null
4
3,106
This project is literally making me lose sleep. I think about it all day long, I dream about it at night, and when I lie awake I think about it some more. It's seriously getting me to the point of crying, haha. I don't know how to structure my application and I don't know how to execute my ideas. First of all, a short introduction. I study Interactive Multimedia Design, and I have a course called 'Project'. As the name suggests, we have to think up and create a project, more specifically a web application, using PHP, HTML/CSS, MySQL, AJAX, .. whatever technology we want to use. Since we also have to challenge ourselves to a certain extent, I decided to learn and use the CodeIgniter framework for this project. We have to show our professors what we are able to achieve. (This application won't be deployed or used, though. It's just a showcase.) I will be creating a web application, a calendar/planner for students. They can keep track of their classes and homework, free time, etc. Here's a screenshot of what I'm trying to achieve: ![Web app page](https://i.stack.imgur.com/zJwwk.jpg) I already threw out the slider and fixed this by using AJAX requests for the next/previous buttons. You can see the latest version of the website [here](http://www.obscura-design.be/planner/). However, I'm not happy with my code. I'm not happy with what I'm doing. To be brutally honest, I'm confused. I'm hopelessly confused. I have read blogs, books, websites about CodeIgniter, about the MVC model; I have a fairly decent knowledge of PHP and I picked up the framework rather quickly. But still, so confused. I started by coding my [login form](http://www.obscura-design.be/login). All good. I have a login controller, with an `index()` function, a `go()` function which focuses on form validation (using the form_validation library) and setting the session. It handles error messages through AJAX and communicates with the database through my login model. I suppose this follows the MVC pattern fairly well. The actual 'planner' page is a whole different story though. One of the first things I was wondering about is whether or not I can use/call functions from a view. If I follow the MVC guidelines, I would say I cannot. So what I'm doing now is stacking all the data in $data arrays in my controller and then echo'ing those out through jQuery AJAX calls, straight into my webpage. This brings forward my first, ridiculously simple, question. Is this okay? One of my main concerns is of course users who don't have javascript enabled; the application simply doesn't work. I have read about graceful degradation and progressive enhancement, but I'm just not sure if this application is do-able without JS. Another thing I'm not sure about (AJAX-wise) is the fact that I have two different AJAX-calls on $(document).ready, and then like four more when the user clicks on different elements. It also bothers me that jQuery `.html()` doesn't actually put the contents inside my html tags (when I view source). The list of days at the top gets generated by a function called `init_days()`. I populate the list using one of the $(document).ready() AJAX calls. It works fine, but the function is a huge mess. In the controller, I create an array `$data` and echo the whole list (complete with html tags) into `$data['calendar']`; I then output this straight into the `<ul>` tags: ``` // populate initial calendar $.ajax( { type: "POST", url: "/planner/init_days", success: function(data){ $("#days_loader").hide(); $(".month").prepend(data['month_name'] + " " + current_year); $("#day_list").html(data['calendar']).fadeIn(); } }); ``` However, when using the next and previous buttons, I kind of call the same function, just with a `data:` option to submit the new month (and, if necessary, year). This seems a bit redundant to me; putting (almost) the same code three times. Not sure how to fix this. My where I'm stuck now, is the part beneath the days. I have those 'Woe, 20 april' table headers, but then underneath that I need to get my actual events. I'm not sure what would be the best approach to creating this feature. Should I put it in a table? But then how would I put certain events on the right place? For now, all I have achieved is a function which outputs all events for a certain day into an array, like so: ``` Array ( [0] => Array ( [id] => 1 [title] => Test Event [description] => Dit is een test event. [day_start] => 2011-04-20 [day_end] => 2011-04-20 [user_id] => 1 [time_start] => 11 [time_end] => 12 ) [1] => Array ( [id] => 2 [title] => Test Event 2 [description] => Dit is een tweede event. [day_start] => 2011-04-20 [day_end] => 2011-04-20 [user_id] => 1 [time_start] => 12 [time_end] => 13 ) ) ``` I'm not sure if a table is the best way to go. The main thing that bothers me is that I'm working with hours and all of these different hours have their own place on the page, if that makes sense. (like 9 am would go on top of the column, 11 pm would be at the bottom, duh). I'm willing to provide a link to my source code (github) if anyone would like to take a look at my mess and perhaps try to put me on the right track again. Perhaps I AM on the right track, still; I just don't feel that way. I got stuck at the displaying-events part, and I just feel horrible because I'm not happy with what I wrote (even though most of it works, at this point). As I'm on Easter break at the moment, I can't contact my teacher for another week, so I'm willing to provide a 100-150 rep bounty for a good, helpful answer to this huge rant/question. If there are any books, websites, blogs I should read on design patterns, MVC, CodeIgniter, and PHP best practices in general, please also provide them. Thanks a lot. If you got to this point, thanks for reading all the way. I appreciate it. EDIT: My source code is here: [https://github.com/cabaret/Studieplanner](https://github.com/cabaret/Studieplanner) PS: This question is a follow-up to [my previous question.](https://stackoverflow.com/questions/5615270/web-app-slider-showing-days-of-the-months-feature) I have taken a lot of steps forward since then, but I'm still not happy and incredibly confused, mostly. I appreciate any help.
CodeIgniter calendar/planning application, structuring and execution
CC BY-SA 3.0
0
2011-04-20T21:02:16.053
2011-07-05T19:37:39.030
2017-05-23T10:32:35.693
-1
613,721
[ "php", "codeigniter", "jquery" ]
5,736,683
1
5,736,876
null
1
3,123
Normally, to center an instance on the stage to another vertically horizontally, you can use simple logic and by referencing width, height, x and y co-ordinates of the symbols involved. This seems impossible in-situ, because Textfield.height and Textfield.textHeight report incorrect values. They bring back the same values, which don't reflect the actual height of the instance on the stage. ![enter image description here](https://i.stack.imgur.com/QCqVU.png) [http://omnom.replete.nu/fails.fla](http://omnom.replete.nu/fails.fla) Thanks.
How can I vertically center a Multiline Textfield (dynamic, text-centered) to another MovieClip?
CC BY-SA 3.0
null
2011-04-20T21:11:02.677
2015-12-01T16:33:56.050
2015-12-01T16:33:56.050
487,719
487,719
[ "flash", "actionscript-3", "actionscript", "flash-cs4" ]
5,737,506
1
null
null
6
909
I'm using GeoDjango with PostGIS and trying to use a polygon to get records from a database which fall inside it. If I define a polygon which is bigger than half the area of the earth it assumes the 'inside' of my polygon is the smaller area which I intended as the 'outside' and returns only results which are outside it. I can just use this smaller, wrong area to exclude results. Polygon.area seems to know what I intend so I can use this to determine when to make my search inclusive or exclusive. I feel like this problem is probably common, is there a better way to solve it? If 180 degrees longitude is inside my polygon this doesn't work at all. It seems GEOS is to blame this time. This image shows what I believe is the reason. Green is the polygon I define, Red is how it seems to be interpreting it.![Polygons on earth](https://i.stack.imgur.com/2L8Zu.jpg) Again this seems like a problem which would crop up often and one that libraries like GEOS are made to deal with. Is there a way?
In PostGIS a polygon bigger than half the world is treated as it's opposite
CC BY-SA 3.0
0
2011-04-20T22:45:53.860
2017-02-16T10:30:46.397
2011-04-20T23:20:11.193
246,265
246,265
[ "postgis", "geodjango", "geos" ]
5,737,633
1
5,737,798
null
1
193
The view is created in interface builder, and is strangely cutting off at the bottom, and help or suggestions, is appreciated. ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self.window addSubview:viewController.view]; [self.window makeKeyAndVisible]; return YES; } ``` ![enter image description here](https://i.stack.imgur.com/yEZrK.png) ![enter image description here](https://i.stack.imgur.com/Kfm7v.png) Edit: I don't actually have a nib for the view controller, but instead a main window nib and a nib for two different views which are different themes. Also if I use: ``` self.window.rootViewController = self.viewController; ``` it does not happen, but sadly this will crash in iOS 3.2 or below.
iPhone View Cutting Off
CC BY-SA 3.0
null
2011-04-20T23:03:52.393
2011-04-21T00:58:50.267
2011-04-21T00:58:50.267
597,775
597,775
[ "iphone", "objective-c", "ios4", "iphone-sdk-3.0", "interface-builder" ]
5,737,733
1
5,904,583
null
19
8,361
I'm trying to store/save an image in an SQL Compact Edition (CE) database. I declare the field in my Student model as: ``` [Column(TypeName = "image")] public byte[] Photo { get; set; } ``` The database is created with the image data type for the Photo column as can be seen here: ![enter image description here](https://i.stack.imgur.com/25bYA.jpg) The problem is: When I run the app and try to save a Student with a Photo of 3 MB (for example), I get an exception: ``` validationError.ErrorMessage = "The field Photo must be a string or array type with a maximum length of '4000'." ``` SQL Server CE supports these [Data Types](http://msdn.microsoft.com/en-us/library/ms172424%28v=sql.90%29.aspx). In this [comparison](http://erikej.blogspot.com/2011/01/comparison-of-sql-server-compact-4-and.html) between SQL Express and SQL Compact Edition (CE) we have that SQL CE supports Binary (BLOB) storage through the use of image data type. > = Variable-length binary data with a maximum length of 2^30–1 (1,073,741,823) bytes. Storage is the length of the value in bytes. Image should do the job I think. What am I doing wrong here? Is this a bug? Note: I also tried the MaxLength data annotation: ``` [Column(TypeName = "image")] [MaxLength(int.MaxValue)] public byte[] Photo { get; set; } ``` but I get this exception: ``` Binary column with MaxLength greater than 8000 is not supported. ``` I found the [post](http://blogs.msdn.com/b/adonet/archive/2011/04/11/ef-4-1-released.aspx) about the release of EF 4.1. It has the following: > Change of default length for non-key string and binary columns from ‘128’ to ‘Max’. SQL Compact does not support ‘Max’ columns, when running against SQL Compact an additional Code First convention will set a default length of 4000. There are more details about the change included in a recent blog post (). Well well well... the only way I could get it working was doing what is described [here](http://blogs.msdn.com/b/adonet/archive/2011/03/29/ef-4-1-rtw-change-to-default-maxlength-in-code-first.aspx), that is, setting `DbContext.Configuration.ValidateOnSaveEnabled = false`. This is a workaround as the post suggests.
Error storing Image in SQL CE 4.0 with ASP.NET MVC 3 and Entity Framework 4.1 Code First
CC BY-SA 3.0
0
2011-04-20T23:17:49.243
2015-03-08T22:14:07.290
2011-04-27T02:14:37.900
114,029
114,029
[ "image", "asp.net-mvc-3", "sql-server-ce", "code-first", "entity-framework-4.1" ]
5,737,941
1
5,740,900
null
0
469
I have a view that when a button is clicked, it brings up a subview that looks like the following image. However there is much wasted space here. How can I change it so that the subview is like an action sheet, just the picker with a done/cancel button right above the picker like is commonly done. Currently this view is a UIView in IB, and is animated in with the following code: ``` - (IBAction)dateButtonPressed { [dateView setFrame:CGRectMake(0, self.view.frame.size.height, self.view.frame.size.width, self.view.frame.size.height)]; [self.view addSubview:dateView]; [UIView animateWithDuration:.5 animations:^{ [dateView setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; ``` ![enter image description here](https://i.stack.imgur.com/J5BCr.png)
How To Change Sub-View From Full Screen To Action Sheet Style
CC BY-SA 3.0
null
2011-04-20T23:51:48.567
2011-04-21T07:25:52.580
null
null
null
[ "iphone", "objective-c", "cocoa-touch" ]
5,738,399
1
null
null
25
6,406
This is almost a duplicate of [Link build configuration to a publish profile](https://stackoverflow.com/questions/5410278/link-build-configuration-to-a-publish-profile), but that question was not answered... --- I have 2 1 Click Publish configurations for my Web Application: 1. Test Server 2. Production Server If I select `Build` => `Configuration Manager` => `Release` and then click the Publish button my application will be published with a release configuration (and visa versa) - without regard to the current Publish profile selected. To set the appropriate Build Configuration from the 1 Click Publish settings. `Test Server` should be published with my Debug settings and `Production Server` should be published with the Release settings. I shouldn't have to make the change from within the Configuration Manager. But I Do. So, I have 2 questions: Am I just doing it wrong? Based on a little note in the Publish Settings stating "Use Build Configuration Manager to change configuration" this seems like this is exactly how it is intended to work. ![booya](https://i.stack.imgur.com/mDIHT.png) Is there another way of having 2 publish profiles, one with a Debug config and one with a Release config? --- :-)
Make Debug/Release Build Configuration with 1 Click Publish dependent on the selected Publish Profile
CC BY-SA 3.0
0
2011-04-21T01:06:06.497
2013-03-14T19:12:48.993
2017-05-23T10:33:14.143
-1
160,173
[ "visual-studio-2010", ".net-4.0", "web-config", "publishing", "one-click-web-publishing" ]
5,738,600
1
5,741,202
null
0
420
I have a Twitter "widget" on my site where I allow users to login and pull in their twitter details and home timeline. I'm using OAuth for this and I have a little concern over rate limiting. In my widget, I'm having to make 2 requests every time I need the latest data. One request for the users details (and latest status) (the top section of my widget), and a separate request for their home timeline (the bottom section of my widget). What I'm wondering is if there is a way to get both with a single request. It just seems like it's a waste of requests to have to do it twice. Any way to do this or is this something I need to make a feature request for to Twitter? Does anyone else think that it would make sense for Twitter to always return the latest user details with each API request/result? ![enter image description here](https://i.stack.imgur.com/r5Npv.png)
Any way to get the users home timeline and their user details in a single request?
CC BY-SA 3.0
null
2011-04-21T01:43:30.953
2011-04-21T07:57:57.527
2011-04-21T01:50:42.890
560,648
21,932
[ "twitter", "rate-limiting" ]
5,738,621
1
5,738,948
null
0
742
I'm experiencing a weird glitch in the [Fancybox for WordPress](http://wordpress.org/extend/plugins/fancybox-for-wordpress/) plugin on [Los del Patio's testing home page](http://testing.losdelpatio.org/). I'm trying to get the featured image to be pulled into a fancybox. The featured image exists as a hidden div that get's display:visible and fancyboxed. It works except the wrapping div doesn't match the image's dimensions. I've even followed the instructions to override by calling out an inline width and height for the container div that's hidden. Here's the screenshot of what's happening: ![screenshot of fancybox wrapping bug](https://i.stack.imgur.com/3it6o.png) Here's the code from my page-casa.phtml template: ``` <aside class="galeria-preview" role="complementary"> <h2><a class="fancybox" href="#galeria-img">Pr&oacute;ximo Exposici&oacute;n: <br/> <span class="verde"><?php echo get_post_meta($post->ID, 'galeria-proximo',true); ?></span></a></h2> <div style="width:940px;height:400px;" id="galeria-img" class="hidden"> <?php the_post_thumbnail( 'full' ); ?> </div> </aside> ``` Thanks for any help peeps!
Fancybox WordPress Plugin not Wrapping overlay div to image content
CC BY-SA 3.0
null
2011-04-21T01:47:36.860
2011-04-21T02:48:32.880
null
null
202,141
[ "jquery", "wordpress", "plugins", "fancybox" ]
5,738,636
1
7,253,862
null
7
7,130
In both XCode and the iPhone Configuration Utility, there is a Provisioning Profiles item that shows at most 2 devices in a provisioning profile. It also says "8 other devices". - Is there any convenient way to find out what those other 8 are (without going back to the provisioning portal?) ![enter image description here](https://i.stack.imgur.com/96pxp.png)
iPhone Config Utility - show all devices in a provisioning profile
CC BY-SA 3.0
0
2011-04-21T01:49:25.587
2015-04-20T11:08:30.470
2011-04-29T23:08:10.333
185,799
165,050
[ "iphone", "xcode" ]
5,738,651
1
5,744,062
null
4
964
Are there any mySQL frontends, like phpmyadmin, that has a graphical interface for joins? I know you can run saved queries (which may include joins) in phpmyadmin, but I am looking for a user-friendly way of how other frontends are tackling the problem. I don't actually need a frontend, I just want to see how others are doing it. If there are none are available, what would be a good way of approaching creating a join interface? I am currently thinking, given a `student` and `enrollment` table (as a super simple example), such that ``` student table +---------------------------+ | id | name | number | +------+--------+-----------+ | 2 | Joe | 04567843 | | 3 | Jim | 43243254 | | 4 | Jack | 23145671 | +------+--------+-----------+ ``` and.. ``` enrollment +---------------------+------------+-----------+ | id | student_id | course_id | score | +------+--------------+------------+-----------+ | 1 | 2 | ma001 | 86% | | 2 | 2 | en001 | 46% | | 3 | 3 | ma001 | 78% | +------+--------------+------------+-----------+ ``` The interface could allow you to select a primary table, and the fields you want, then a secondary table, and the fields you want. And finally, a JOIN fieldset, where you choose the join type and the fields connecting it (see image). The image is a mockup using firebug manipulating phpmyadmin to show what I mean (hopefully) ![enter image description here](https://i.stack.imgur.com/aiZ4m.png) I realise this is kind of 2 questions, but highly linked to each other, but to summarise, does a front end like this exist? And if not, would the above approach work?
Is there a mySQL frontend that has an interface for joins?
CC BY-SA 3.0
0
2011-04-21T01:52:12.393
2011-04-22T21:08:50.903
null
null
614,112
[ "php", "mysql", "database", "join", "phpmyadmin" ]
5,738,840
1
5,738,868
null
3
6,735
I am fairly a beginner with javascript. What I want to do is when I click on a button: ![enter image description here](https://i.stack.imgur.com/9iWk3.png) I want it to popup a window. The content of this window is HTML (actually it's a .php) code. As follows: ![enter image description here](https://i.stack.imgur.com/WJq4P.png) Then when you click next it scrolls to the next list of movies. What is the easiest javascript/jQuery library to do this? This snippet of pitcure is taken from the website getglue. I tried to firebug the site, but can't seem to find the js code to do it. The movie title and image is taken from a database, and therefore content is not static html. This is where I actually got confused on how to do a dynamic content generated window popup box
javascript html popup window
CC BY-SA 3.0
0
2011-04-21T02:27:43.900
2022-04-14T18:50:56.770
2011-04-21T02:43:00.567
95,265
95,265
[ "php", "javascript", "jquery" ]
5,738,911
1
5,738,955
null
1
1,247
Currently I'm working off of a data set which is just redicolus; a flat file from multiple vendors which has no rhyme or reason; and sits at about 200 columns.. There are 15 which are common between those 200, which I have pulled out into another table. From the other 185 columns they are a mix of varchar's, int's datetime's and multiple string values. Right now I'm trying to decide how best to store these other 185 columns; as in a flat table currently it's just proving to scale super poorly. I have two solutions setup, however I do not know which one is better. One is storing the meta data for each of the columns in separate tables (seen in image) ![Image architecture](https://i.stack.imgur.com/rks2y.png) However it seems that using this method; it's going to be very difficult if down the road I need to do queries on items which lie within here. THe other method I've thought of is throwing all the columns into a table which has id, value, datatype, than when doing queries cast the value to the datatype ie: ``` select * from foo where cast(col_to_query) as int < 5 ``` however I'm not sure what the performance is like when doing things that way. Question: Which of these two methods would be better performance wise and which one would you recommend (or if there is a better option I would love to hear it). Thank you
Mysql Casting Performance Benchmark question / Data Architecture
CC BY-SA 3.0
null
2011-04-21T02:40:30.240
2011-04-21T02:57:31.897
null
null
123,389
[ "mysql", "performance", "architecture" ]
5,739,046
1
null
null
1
836
It seems that function CGAffineTransformMakeRotation and CGAffineTransformMake can not work together. ``` CGContextSetTextMatrix (context, CGAffineTransformMakeRotation (degreesToRadians(40))); CGContextSetTextMatrix(context, CGAffineTransformMake(1.0,0.0, 0.0, -1.0, 0.0, 0.0)); ``` I got this ![enter image description here](https://i.stack.imgur.com/YRt3u.png) ``` CGContextSetTextMatrix (context, CGAffineTransformMakeRotation (degreesToRadians(40))); CGContextSetTextMatrix(context, CGAffineTransformMake(1.0,0.0, 0.0, -1.0, 0.0, 0.0)); ``` I got this ![enter image description here](https://i.stack.imgur.com/ajJk5.png) What I want to implement is the words are readable and have 40 degree with X-axis. Thanks!
function CGAffineTransformMakeRotation and CGAffineTransformMake can not work together using quartz-2d
CC BY-SA 3.0
null
2011-04-21T03:06:19.910
2011-07-05T18:14:58.330
null
null
null
[ "iphone", "quartz-2d" ]
5,739,514
1
5,743,591
null
0
1,371
good day gurus! I'm new to ASP.NET and I'm still in the process of learning it. I was able to finish a couple of aspx pages through searching google but I can't seem to get this one page to work. Basically, I'm trying to display a table (data fetched from SQL table). All data are fetched from SQL table except for these static cells: ``` Item | Jan | Feb | March | April | Total Sponge | Rod | Clock | Paper | Prod Cost | Profit (and all the SUMS) ``` ![screenshot](https://i.stack.imgur.com/qXbRt.png) The "Adjust1" is inserted there if its values are not null. And this "Adjust1" also affects the "Total". I hope someone can point me to the right direction. Thanks a lot for your time, Pod
Display Table (SQL data) with static & dynamic cells in ASP.NET
CC BY-SA 3.0
null
2011-04-21T04:28:33.063
2011-04-21T11:42:57.983
2011-04-21T04:33:34.717
715,361
715,361
[ "c#", "asp.net", "sql" ]
5,739,621
1
null
null
1
315
> [Set Visual Studio to target Windows Phone 7 emulator by default?](https://stackoverflow.com/questions/5127253/set-visual-studio-to-target-windows-phone-7-emulator-by-default) After installing the latest WP7 dev updates (the one that adds copy/paste-ready) and the emulator updates, my VS defaults all WP7 projects to "Windows Phone 7 " instead of "Windows Phone 7 ". Prior to this update, it always defaulted to emulator. I can't figure out how to get that back - I've searched everywhere and can't locate any configuration from inside VS. Does anyone know of a way to fix this? ![enter image description here](https://i.stack.imgur.com/IdbkL.png)
VS2010 defaults WP7 apps to "Windows Phone 7 Device" instead of Emulator
CC BY-SA 3.0
null
2011-04-21T04:43:09.510
2011-04-21T06:21:08.453
2017-05-23T12:18:59.633
-1
149,573
[ "visual-studio-2010", "windows-phone-7" ]
5,739,724
1
5,739,787
null
1
1,649
I've got an xml which has html within the xml tags and i'm not able to parse as it. When i start parsing the xml the tag has html in it ![enter image description here](https://i.stack.imgur.com/pgpPp.png) can anyone help me out in extracting the html with all the tags.
How to parse xml having html tags within xml tags
CC BY-SA 3.0
null
2011-04-21T04:56:48.340
2011-04-21T05:47:24.110
2011-04-21T05:47:24.110
694,260
694,260
[ "java", "xml" ]
5,740,655
1
5,757,392
null
0
2,753
A question about dragging and dropping tree view items in WPF. My original question is a little complex. So I simplified it, and here is the code: XAML ``` <Window x:Class="WpfApplication2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <TreeView> <TreeView.ItemContainerStyle> <Style> <Setter Property="TreeViewItem.IsExpanded" Value="True"/> <Setter Property="TreeViewItem.Background" Value="LightBlue"/> <Setter Property="TreeViewItem.AllowDrop" Value="True"/> <EventSetter Event="TreeViewItem.MouseMove" Handler="TreeNode_MouseMove"/> <EventSetter Event="TreeViewItem.Drop" Handler="TreeNode_Drop"/> </Style> </TreeView.ItemContainerStyle> <TreeViewItem Header="first node in the tree"/> <TreeViewItem Header="second node in the tree"></TreeViewItem> <TreeViewItem Header="third node in the tree"></TreeViewItem> </TreeView> </Grid> ``` And code-behind: ``` public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void TreeNode_MouseMove(object sender, MouseEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { DragDrop.DoDragDrop(this, DateTime.Now.ToString(), DragDropEffects.Move); } } private void TreeNode_Drop(object sender, DragEventArgs e) { string str = (string)e.Data.GetData(typeof(string)); MessageBox.Show(str); } } ``` So what I want to do is very simple, just pop up a message box when one tree view item is dragged and dropped on another tree view item. When I drop it right on another item, it works fine, like this: ![enter image description here](https://i.stack.imgur.com/rvzoK.png) But if I drag it slightly off the boundary of the item, it does not work, like this: ![enter image description here](https://i.stack.imgur.com/2QaQD.png) The mouse cursor is displayed as a “forbidden sign”, sorry I can’t get it in the screen shot. So now my question is: how to make the second condition work? How to make the Drop event still fire up when the dropping location is slightly off the boundary of the item? Thanks in advance.
Dragging and dropping TreeViewItems in non-clickable area of TreeView [WPF]
CC BY-SA 3.0
null
2011-04-21T06:59:36.180
2011-04-22T16:08:46.433
2011-04-21T10:24:11.730
219,516
290,284
[ "c#", ".net", "wpf", "treeview", "drag-and-drop" ]
5,740,757
1
5,741,046
null
0
1,602
I subclassed UITableViewController and set a UITableView with GroupedStyle as it's subview. When I run my project in the Simulator the section headers appear twice: In GroupedStyle and in PlainStyle. Does anyone have an idea why this is happening? I've attached the functions that I believe could be the culprits below. ![2 section headers in Simulator](https://i.stack.imgur.com/FBeh4.png) ``` - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; [self setup]; self.title=@"Literature"; UITableView *tableview = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; tableview.scrollEnabled=NO; tableview.delegate=self; tableview.dataSource=self; [self.view addSubview:tableview]; [tableview release]; return self; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ NSInteger inte=2; switch (section) { case 0: inte=2; break; case 1: inte=4; break; } return inte; } -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ return 2; } -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ NSString *temp; switch (section) { case 0: temp=@"Literature"; break; case 1: temp=@"Online"; break; } return temp; } ```
UITableViewStyleGrouped with headers for Grouped AND Plain
CC BY-SA 3.0
null
2011-04-21T07:10:58.593
2011-04-21T07:49:14.157
null
null
704,149
[ "iphone", "objective-c", "cocoa-touch" ]
5,740,924
1
null
null
2
2,879
For example like this ![enter image description here](https://i.stack.imgur.com/bMacE.png) it's transparent .png Currently I use this transparent png and I'm fine with that but I'm just curious if it's also possible with CSS3 (on Web-kit browsers) I saw this Pattern Gallery [http://leaverou.me/css3patterns/](http://leaverou.me/css3patterns/) it's for patterns.
How to make transparent texture pattern using CSS3?
CC BY-SA 3.0
null
2011-04-21T07:28:44.303
2011-04-21T11:41:11.723
null
null
84,201
[ "webkit", "css", "mobile-webkit" ]
5,740,899
1
5,741,175
null
7
4,668
I'm trying to put the buttonbar I've created on the bottom of each screen. I've succeeded for the first screen fairly easy. Now I've tried to put it other screens, but it seems that it can't stick to the bottom of the screen. When I look in the hiearchyviewer, it looks like the RelativeLayout that's wrapped araound my layout and buttonbar, isn't filling the whole screen, though, its height is set to fill parent. Can anyone help me by pointing out where I'm going wrong? This is the XML I use: ``` <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5pt" android:id="@+id/table" android:stretchColumns="1"> <TableRow> <TextView android:text="@string/Arbeiderbediende" android:id="@+id/txtArbeiderBediende" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </TableRow> <TableRow android:gravity="center"> <RadioGroup android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:id="@+id/group1"> <RadioButton style="@style/RadioButton" android:layout_width="wrap_content" android:id="@+id/rbArbeider" android:text="@string/Arbeider" android:layout_height="wrap_content" android:paddingLeft="18pt" /> <RadioButton style="@style/RadioButton" android:layout_width="wrap_content" android:id="@+id/rbBediende" android:text="@string/Bediende" android:layout_height="wrap_content" android:layout_marginLeft="20pt" android:paddingLeft="18pt" /> </RadioGroup> </TableRow> <TableRow android:gravity="center" android:paddingTop="5dip"> <TextView android:text="@string/OverzichtFuncties" android:id="@+id/txtFuncties" android:layout_width="0dip" android:layout_weight="1" android:layout_height="wrap_content" /> <Spinner android:layout_height="wrap_content" style="Spinner" android:layout_width="0dip" android:layout_weight="2" android:id="@+id/cmbFuncties" /> </TableRow> <TableRow android:gravity="center" android:paddingTop="5dip"> <TextView android:text="@string/Regio" android:id="@+id/txtRegio" android:layout_width="0dip" android:layout_weight="1" android:layout_height="wrap_content" /> <Spinner android:layout_height="wrap_content" android:layout_width="0dip" android:layout_weight="2" android:id="@+id/cmbRegio" /> </TableRow> <TableRow android:gravity="center" android:paddingTop="5dip"> <TextView android:text="@string/Opleiding" android:id="@+id/txtOpleidingsniveau" android:layout_width="0dip" android:layout_weight="1" android:layout_height="wrap_content" /> <Spinner android:layout_height="wrap_content" android:layout_width="0dip" android:layout_weight="2" android:id="@+id/cmbOpleidingsniveau" /> </TableRow> <Button android:text="@string/VindJobButton" android:id="@+id/btnFindJob" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dip" /> </TableLayout> <stage.accent.Toolbar android:layout_width="fill_parent" android:layout_height="70dip" android:layout_alignParentBottom="true" android:layout_below="@+id/table" /> </RelativeLayout> ``` This is the result I achieved and the result I want to get ![enter image description here](https://i.stack.imgur.com/1VFfz.png) ![enter image description here](https://i.stack.imgur.com/1kxJf.png)
Buttonbar won't stick to bottom of screen
CC BY-SA 3.0
0
2011-04-21T07:25:44.303
2011-12-10T15:15:36.980
2011-04-21T07:35:45.960
696,892
696,892
[ "android", "xml" ]
5,740,975
1
6,491,906
null
2
2,678
I have an rdlc report in asp.net. I have a table in it and I am using group by in that table. But the columns which I make Parent Group or child group has Column Visibility Disabled. ![enter image description here](https://i.stack.imgur.com/23TaH.jpg) Notes Column is in a group. See its visibility option is disabled. How can I hide that column on the basis of a criteria as I can do with the Exam Date column that is not in any group. Please help.
RDLC Report Column Visibility Problem in Group By
CC BY-SA 3.0
0
2011-04-21T07:34:11.993
2011-06-27T11:07:41.820
2011-06-16T07:38:41.393
546,730
669,448
[ "asp.net", "reporting", "visibility", "rdlc" ]
5,741,084
1
5,741,174
null
0
1,077
Good day. I'm busy with a new website, but I am caught in a slight tangle. ![Current folder layout of careers.aspx and database which is detached](https://i.stack.imgur.com/J8uvz.jpg) How can I set up my data source in my web.config file to access the database listed in App_Data? Here is what I tried. I am a little rusty with detached databases. ``` <connectionStrings> <add name="Careers" providerName="System.Data.SqlClient" connectionString="AttachdbFilename=../|DataDirectory|/Careers_30March.mdf;user instance=true;Integrated Security=true;"/> </connectionStrings> ``` This was my result: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) All I need is to access this database. I know how to read connection strings from the web.config to create a `SqlConnection` object. No usernames / passwords were allocated to this database.
Detached Database data source in web.config
CC BY-SA 3.0
null
2011-04-21T07:46:53.787
2011-04-21T07:55:02.013
2020-06-20T09:12:55.060
-1
705,561
[ "asp.net", "sql-server", "web-config", "connection-string", "datasource" ]
5,741,134
1
null
null
0
98
I am currently facing one problem which not yet figure out good solution, so hope to get some advice from you all. ![enter image description here](https://i.stack.imgur.com/VwtDo.jpg) Core Database is where all the clients connect to for managing live data which is really really big and busy all the time. Feature Database is not used so often but it need some part of live data (maybe 5%) from the Core Database, But the request task to this server will take longer time and consume much resource. What is my current solution: 1. I used database replication between Core Database & Feature Database, it works fine. But the problem is that I waste a lot of disk space to store unwanted data. (Filtering while replicate data is not work with my databases schema) 2. Using queueing system will not make data live on time as there are many request to Core Database. Please suggest some idea if you have met this? Thanks, Pang
What strategy/technology should I use for this kind of replication?
CC BY-SA 3.0
null
2011-04-21T07:52:06.187
2011-04-21T14:35:15.773
null
null
52,727
[ "mysql", "database", "replication", "database-replication" ]
5,741,267
1
5,744,162
null
3
16,047
I am trying to fetch the EditText value on click of a button. ``` String ETValue = ((EditText)findViewById(R.id.ETID)).getText().toString().trim(); ``` Every things works fine on other android versions, but on 1.6 I am getting ""(Empty) String. Whats going wrong on Android 1.6, how this is happening? Thanks Screen Shots: ![enter image description here](https://i.stack.imgur.com/a09ST.png) ![enter image description here](https://i.stack.imgur.com/wfnT9.png) Code Reference : main.xml ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:layout_marginTop="10dip" android:layout_marginLeft="5dip" android:text="Type you text here" android:id="@+id/TextView02" android:layout_height="wrap_content" android:textColor="#333333" android:layout_width="fill_parent" android:textSize="16dip"> </TextView> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/ID1"> <EditText android:layout_marginLeft="5dip" android:id="@+id/keyword" android:hint="e.g. Text here" android:textSize="17dip" android:singleLine="true" android:layout_height="wrap_content" android:layout_width="250dip"/> <Button android:id="@+id/btnID" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFFFF" android:background="@drawable/icon" android:gravity="bottom" android:paddingBottom="9dip" android:layout_marginLeft="3dip"/> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/ID2" android:visibility="gone"> <EditText android:layout_marginLeft="5dip" android:id="@+id/keyword" android:hint="e.g. Text here" android:textSize="17dip" android:singleLine="true" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_marginRight="5dip" /> </LinearLayout> <Button android:text="Click" android:id="@+id/Button01" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button> </LinearLayout> ``` Etext.Java ``` public class EText extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ((LinearLayout)findViewById(R.id.ID1)).setVisibility(View.GONE); ((LinearLayout)findViewById(R.id.ID2)).setVisibility(View.VISIBLE); Button but = (Button) findViewById(R.id.Button01); but.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { String ETValue = ((EditText) findViewById(R.id.keyword)).getText().toString().trim(); Toast.makeText(EText.this, ETValue, Toast.LENGTH_SHORT).show(); } }); } } ``` > Even this way doesn't works ``` public class EText extends Activity { /** Called when the activity is first created. */ EditText ETextt1 = null; EditText ETextt2 = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); if(Integer.parseInt(Build.VERSION.SDK) < 7){ ((LinearLayout)findViewById(R.id.ID1)).setVisibility(View.GONE); ((LinearLayout)findViewById(R.id.ID2)).setVisibility(View.VISIBLE); ETextt1 = ((EditText) findViewById(R.id.keyword1)); }else{ ETextt2 = ((EditText) findViewById(R.id.keyword2)); } Button but = (Button) findViewById(R.id.Button01); but.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { String ETValue = null; if(null == ETextt1){ ETValue = ETextt2.getText().toString().trim(); }else if(null == ETextt2){ ETValue = ETextt1.getText().toString().trim(); } Toast.makeText(EText.this, ETValue, Toast.LENGTH_SHORT).show(); } }); } } ``` > This Works Perfectly Fine :-) ``` package com.test.et; import android.app.Activity; import android.os.Build; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.Toast; public class EText extends Activity { /** Called when the activity is first created. */ EditText ETextt1 = null; EditText ETextt2 = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); if(Integer.parseInt(Build.VERSION.SDK) < 7){ ((LinearLayout)findViewById(R.id.ID1)).setVisibility(View.GONE); ((LinearLayout)findViewById(R.id.ID2)).setVisibility(View.VISIBLE); } //ETextt = ((EditText) findViewById(R.id.keyword1)); Button but = (Button) findViewById(R.id.Button01); but.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { String ETValue = null; if(Integer.parseInt(Build.VERSION.SDK) < 7){ ETValue = ((EditText) findViewById(R.id.keyword2)).getText().toString().trim(); }else{ ETValue = ((EditText) findViewById(R.id.keyword1)).getText().toString().trim(); } Toast.makeText(EText.this, ETValue, Toast.LENGTH_SHORT).show(); } }); } } ```
Android : EditText.getText() returns "" (Empty) String on Android 1.6
CC BY-SA 3.0
0
2011-04-21T08:05:41.677
2012-03-05T09:48:29.407
2011-04-21T13:46:47.903
28,557
28,557
[ "android" ]
5,741,317
1
5,741,337
null
5
13,650
I am working on a dutch site and i am having a problem with the logo of it. I saved the logo as PNG24 sothat the characters "hvb" in the logo will be transparent. for some odd reason, it shows the characters in plain old white. Could somebody please tell me how this is possible. By the way: it is not caused by the h1 tag it is wrapped around. [http://www.luukratief-design.nl/wp/](http://www.luukratief-design.nl/wp/) Help would be appreciated I have never seen this befor, but you guys where right! The image HAS indeed have white letters! The odd part about it is that the layers were hidden, so they look transparent in photoshop. Once i used save for web and exported it to png, all of a sudden they are white. Take a look at the screeny: ![enter image description here](https://i.stack.imgur.com/VOJDE.jpg) As stupid as it sounds, i deleted the white layers (which werent even visible), and exported it again. As you can see it works now. I can only choose 1 right answer, so i will choose the first guy who pointed this out. Thanks guys. Still strange, but thanks!
PNG image not transparent on website, cannot find out why
CC BY-SA 3.0
null
2011-04-21T08:10:26.277
2011-04-21T08:58:48.043
2011-04-21T08:58:48.043
691,035
691,035
[ "html", "css", "png", "transparency" ]
5,741,318
1
5,747,015
null
2
5,262
I'm looking at using doctrine for an application I'm working on - but after reading the documentation I'm having trouble conceptualizing how to represent the database structure we have in terms of entities. I have many tables which have partner tables which hold translation data like the following.... ![Tables ER diagram](https://i.stack.imgur.com/89a7m.png) Where I would like to have one Entity (Navigation Element) which had access to the 'label' field depending on what Language I set in my application. The following from the Doctrine documentation seems to suggest that you need to define one (single) table which is used to persist an entity > [http://www.doctrine-project.org/docs/orm/2.0/en/reference/basic-mapping.html](http://www.doctrine-project.org/docs/orm/2.0/en/reference/basic-mapping.html) By default, the entity will be persisted to a table with the same name as the class name. In order to change that, you can use the @Table annotation as follows: Or do I need to define two entities and link them (or allow the translation table to inherit from the element table). And what strategy would I use to always insert a language_id clause to the Join (to ensure I'm pulling the right label for the currently set language). Is this something I would define in the entity itself, or elsewhere?
Mapping two tables to one entity in Doctrine2
CC BY-SA 3.0
null
2011-04-21T08:10:29.467
2012-09-02T16:42:21.197
2012-09-02T16:42:21.197
759,866
181,707
[ "orm", "symfony1", "doctrine-orm", "data-modeling" ]
5,741,392
1
5,773,445
null
1
337
Below you can see my current project structure. But I am not fully happy with it. The main problem is that I don't know where to put Test projects. According to the title, it would be logically to put YML.Tests inside YML folder. But in this case I will mix YML project structure and YML.Tests project folder (it is not critical but I don't like it). Another way is to rename YML.Tests to YMLTests and then there will be less reasons to put YMLTests inside YML. But then I will want to combine YML and YMLTests into one folder. And I have to idea how to name it. YML? Then YML project will be inside one more YML folder. Hm... Any ideas how to make it better? ![enter image description here](https://i.stack.imgur.com/XfxSb.png)
Place for Test-projects in projects structure
CC BY-SA 3.0
null
2011-04-21T08:19:16.433
2011-04-24T21:47:42.667
null
null
188,826
[ ".net", "projects-and-solutions" ]
5,741,680
1
5,743,130
null
3
3,148
I have background templates where java program must write some dynamic texts, ``` BufferedImage image = ImageIO.read(new File("background.jpg")); Graphics g = image.createGraphics(); g.setFont(new Font("DejaVu Sans",Font.PLAIN,18)); g.drawString("Hello,World!",10,10); ``` When writing in such manner, I have some resolution problems around text that Java wrote. How to write high resolution text on image by Java? UPDATE: Here example with anti-aliasing. ![enter image description here](https://i.stack.imgur.com/mgoU3.jpg) ``` g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); ```
How to get Java g.drawString() high resolution?
CC BY-SA 3.0
null
2011-04-21T08:45:25.790
2011-04-22T07:30:36.187
2011-04-22T07:30:36.187
479,625
479,625
[ "java", "image", "graphics", "resolution" ]
5,741,999
1
5,800,005
null
0
613
I'm trying to convert the RealViewSwitcher based on the work from [Marc Reichelt](http://marcreichelt.blogspot.com/2010/09/android-use-realviewswitcher-to-switch.html) into one that is backed up with a ListAdapter. A horisontally scrollable ViewGroup that contains multiple views, where one is visible at a time. My current solution adds at the most 3 views to the ViewGroup at a time. One (in the middle) which is visible and two buffered views, one on each side. When a user scrolls, say to the right, the left-most View is removed and a new View is added to the right. In order for the ViewGroup to be scrollable both to the left and right I need to always focus on the View in the middle. So, when a View is being switched, I arrange the Views correctly and sets focus on the View in the middle. The issue with this approach is that it suffers with a flickering effect when the Views are arranged. Let me illustrate the issue with a picture I drew: ![problem scenario](https://i.stack.imgur.com/xtZgV.jpg) A, B and C are three different views in my ViewGroup (the ListAdapter backing up the ViewGroup contains of more elements though, but only three are loaded at a time). The larger rectangle represents where focus is at the moment. I scroll to the left and at (3) I snap to the destination which is the left-most View. Then I re-arrange the view. I.e. Add a new view X to the left and remove View C to the right, placing A in the middle. Finally I center on the View in the middle (A) which was the one I scrolled to from the beginning. So, when I do the last re-arranging of Views and center on A in the middle, the content of the View which was previously in the middle (B in this case) flashes a few milliseconds causing a flicker effect which is uncalled-for. Any ideas of how I can go around that?
Flicker issue when scrolling views
CC BY-SA 3.0
0
2011-04-21T09:15:12.747
2011-05-01T17:25:48.810
2011-05-01T17:25:48.810
109,926
109,926
[ "android", "scroll", "viewgroup" ]
5,742,140
1
18,440,422
null
6
2,809
I'm currently wondering about an image recognition problem that is supposed to be easy, but could not find an easy solution so far. Input is a rectangular picture of something around 1 megapixel that shows a light, wooden surface. It has a thin, but visible grid on it. The grid is of black black color, regular and almost squared (about 8% longer than wide). The grid size is exactly 19x19. The general board color is "wood", it can vary but tend to be a light brown-ish. ([more info](http://senseis.xmp.net/?Goban)) There are lots of small, round, black and white stones placed on the surface. They are always placed on the intersections, but due to human error they may be slightly off. Their color is pure black and white. The board is covered by 0 to around 300 stones (80% of 361 intersections). The number of black and white stones is about the same. The size of the border (edges of the board where no stones are ever placed) varies, is but known to be "small". Light may cause shadows of stones to appear on the board. Also, it causes a single white dot to appear on the stones (in the direction of the light). ![goban](https://i.stack.imgur.com/iYDMf.jpg) I'd like to detect the position of the stones on the grid. My idea would be to look at the brightness of each pixel and sort them into 3 classes: light (white stones), medium (board) and dark (black stones). Areas with many black pixels are considered to be black stones, and so on. Afterwards, the size of the black and white areas could be used to calculate the actual grid size. Another idea is to recognize the grid lines and use them to, well, calculate the grid size and position. Since the lines are very thin (and often covered by stones), I'm not sure how to do that. I'd love to hear you ideas on this issue. Are there algorithms that seem fitting? Can you think of cool tricks that help greatly? Am I insane and this problem is unsolvable? I'm working in C# but any language is welcome.
Simple image recognition: black and white stones on a grid
CC BY-SA 3.0
0
2011-04-21T09:28:19.643
2016-01-04T10:40:10.473
null
null
39,590
[ "image-recognition" ]
5,742,258
1
5,742,307
null
3
1,038
I am currently with a problem. I am creating a reporting system in C#. It uses Excel and Word. The system generates a Word document and then imports the Excel document into the Word document. The problem is as follows: If I have a Word document with red text export to PDF I get the neat red. Same with a standard Excel export. I want do do this: - - - So the million dollar question is: How can i keep the coloured text from excel when i export my Word to PDF ! :-D I really appriciate any help! And i might throw in a bounty if the question stays open for a while. : The color is still good when i import the Excel into Word. Edit: I use the Office 2010 for generating the report Edit2:![Why i cant skip Excel](https://i.stack.imgur.com/QRl5l.png)
Issue with Excel into Word then export to PDF
CC BY-SA 3.0
null
2011-04-21T09:40:15.933
2015-06-12T15:22:04.477
2015-02-25T20:16:24.667
3,204,551
680,093
[ "c#", "excel", "vba", "ms-word", "ms-office" ]
5,742,318
1
5,742,474
null
5
1,723
Is there a way to put text into the the upper left header cell of a DataGridView? The red x marks the spot I want to fill with text: ![enter image description here](https://i.stack.imgur.com/ZvgJ3.png)
How to set Header for DataGridview RowHeader?
CC BY-SA 3.0
0
2011-04-21T09:45:19.267
2011-04-21T09:59:16.620
null
null
582,640
[ "c#", ".net", "datagridview" ]
5,742,339
1
5,742,522
null
5
12,072
I'm using two DataContext objects to return seperate AsQueriable() datasets then joining the two using linq. The data construction works perfectly however when I pass that combined dataset to the view, I'm getting the error 'object' does not contain a definition for 'Name'. During a debug session I can clearly see that both the parent Model and each 'item' in the foreach loop has all the data and keys visible/accessible. I'm very confused. Many of the other q&a's on stackoverflow.com that match this problem don't solve my issue and as a result would appreciate a fresh set of eyes and hopefully a solution to this problem. Many thanks! - code time: The data construction ``` public ActionResult SplashImages() { var g = (from i in GetGallerySplash() join o in GetFestivals() on i.Festival equals o.ID orderby i.Rating descending select new {i.Photo, i.OwnedBy, i.Rating, o.Name }); Response.ContentType = "text/xml"; return View(g); } private IEnumerable<Gallery> GetGallerySplash() { GallerysDataContext gdc = new GallerysDataContext(); return (from i in gdc.Galleries orderby i.Rating descending select i).Take(15).AsQueryable(); } private IEnumerable<Festival> GetFestivals() { FestivalsDataContext fdc = new FestivalsDataContext(); return (from i in fdc.Festivals select i).AsQueryable(); } ``` VSExpress's error screen: ![Exception screenshot](https://i.stack.imgur.com/Yep3l.png) Any guidance on a solution would be greatly appreciated. Thank you! C
'object' does not contain a definition for 'Name'
CC BY-SA 3.0
null
2011-04-21T09:47:01.343
2011-04-21T10:10:53.713
null
null
195,030
[ "c#", "asp.net-mvc-2", "exception" ]
5,742,503
1
5,870,917
null
6
10,163
I am trying to create an EditText which toggles its state between read only and write mode. My XML is as below: ``` <EditText xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/textArea" android:layout_width="fill_parent" android:layout_height="wrap_content" android:lines="4" android:inputType="textMultiLine"> </EditText> ``` In my code i do the following : ``` textArea = (EditText) convertView.findViewById(com.pravaa.mobile.R.id.textArea); //isEditable decides if the EditText is editable or not if(!isEditable){ textArea.setInputType(InputType.TYPE_NULL); } //the view is added to a linear layout. addView(textArea); ``` My issue is that the text does not get wrapped. Am i missing out on something? Kindly help me with this. I have also attached an image of my output. ![EditText does not exapnd in height](https://i.stack.imgur.com/wswp2.png) ![The text does not wrap](https://i.stack.imgur.com/U5Aao.png) The text set in the view is "12345678901234567 90123456789012345678901234567890 Nationwide Campaign New"
EditText not wrapping its content
CC BY-SA 3.0
null
2011-04-21T10:01:47.687
2015-07-06T15:19:55.207
2011-04-25T12:30:08.757
1,288
533,690
[ "android" ]
5,742,581
1
5,744,098
null
2
1,768
I'd like to adapt jinja.el to work with one-line comments using `##`. But my knowlege of elisp is bad. Who can help me? What do I want: i'd like to hilite ``` ## some text ## {% include "_template.html" %} ``` as a commented out strings. But it works not fully correct. 1st line of snippet looks like comment out while 2nd - not. Here is what i've got: ![enter image description here](https://i.stack.imgur.com/sB7lc.png) And here is a part of jinja.el taken from Jinja's git repo plus my regexp for `##`: ``` (defconst jinja-font-lock-keywords (list ; (cons (rx "{% comment %}" (submatch (0+ anything)) ; "{% endcomment %}") (list 1 font-lock-comment-face)) '("{%-?\\|-?%}\\|{{\\|}}" . font-lock-preprocessor-face) '("{# ?\\(.*?\\) ?#}" . (1 font-lock-comment-face)) '("## ?\\(.*\\)" . (1 font-lock-comment-face)) '("{#\\|#}" . font-lock-comment-delimiter-face) '("##" . font-lock-comment-delimiter-face) ;; first word in a block is a command ```
Jinja templates syntax hilighting
CC BY-SA 3.0
null
2011-04-21T10:09:03.077
2011-04-23T12:53:29.633
null
null
201,528
[ "emacs", "syntax-highlighting", "jinja2" ]
5,742,804
1
null
null
6
1,767
I'm working on a custom UITableViewCell subclass, where everything is drawn in code rather than using UILabels etc. (This is part learning exercise and partly because drawing in code is much faster. I know that for a couple of labels it wouldn't make a huge difference, but eventually I'll want to generalise this to more complex cells.) Currently I'm struggling with the delete button animation: how to animate the cell shrinking as the delete button slides in. ![image](https://i.stack.imgur.com/UbbcW.png) Firstly, I am drawing in a custom subview of the cell's contentView. Everything is drawn in that one subview. I am setting the subview's size by catching layoutSubviews on the cell itself, and doing: ``` - (void)layoutSubviews { [super layoutSubviews]; CGRect b = [self.contentView bounds]; [subcontentView setFrame:b]; } ``` I'm doing this rather than just setting an autoresizing mask because it seemed more reliable in testing, but I can use the autoresizing mask approach in testing if needed. Now, the default thing that happens when someone hits the minus is the view gets squished. ![enter image description here](https://i.stack.imgur.com/wnDTk.png) I can avoid that by, when setting up my cell, calling ``` subcontentView.contentMode = UIViewContentModeRedraw; ``` That gives me the correct end result (my custom view redraws with the new size, and is laid out properly, like the first image I posted), but the animation of the transition is unpleasant: it looks like the cell stretches and shrinks back to size. I know why the animation is working like that: Core Animation doesn't ask your view to redraw for each frame, it gets it to redraw for the end position of the animation and then interpolates to find the middle bits. Another solution is to do ``` subcontentView.contentMode = UIViewContentModeLeft; ``` That just draws the delete button over my cell, so it covers part of it. ![enter image description here](https://i.stack.imgur.com/yYIH6.png) If I also implement ``` - (void) didTransitionToState:(UITableViewCellStateMask)state { [self setNeedsDisplay]; } ``` then once the delete button has slid in the cell 'jumps' to the correct size. That way there's no nice slidey animation, but at least I get the correct result at the end. I guess I could run my own animation in parallel with the delete button appearing, temporarily creating another view with a copy of the image of my view in the old size, setting mine to the new size, and fading between them — that way there would be a nice cross fade instead of a sharp jump. Anyone use such a technique? Now, you might ask why I can't use the `contentStretch` property and give it a region to resize. The problem with that is I'm making something to be reasonably generic, so it's not always going to be possible. In this particular example it'd work, but a more complex cell may not. So, my question (after all of this background) is: what do you do in this situation? Does anyone have the animating delete button working for custom drawn cells? If not, what's the best compromise?
UITableViewCell subclass, drawn in code, animate Delete button in
CC BY-SA 3.0
0
2011-04-21T10:27:28.063
2012-03-04T03:03:42.837
null
null
244,340
[ "cocoa-touch", "ios", "uitableview", "core-animation" ]
5,742,844
1
5,743,442
null
1
1,073
I'm trying to make a Simple Nested List which will be some what similar to this Image.In the Image Main list is on Left and if there's any sublist it will appear on the right on mouse over.![sample look](https://i.stack.imgur.com/eiCzX.png) the Link to what I'm trying looks like[-sample at jsfiddle you can see](http://jsfiddle.net/rainbow99984/GDNe8/1/) Here the Problem I'm facing is Q1 The Sublist is not easy navigable if you hover from list first to second and to third the whole list will disappear. behavior is not consistent may be because of design. Q2. In My main page where I have to integrate it, it keeps Pushing down all the element below it How can i handle it. Q3. Right now the list is displayed like normal nested list, any help on making/showing side by side as in attached Image for reference I'm putting the codes here too. ``` <ul id="ScatList" style="list-style: none inside;cursor: pointer;position: relative;margin: 0px;height:10px;"> <li><span><em>List</em></span> <ul id="liststart" style="display: none;position:absolute;padding:2px 2px 10px 2px;top:20px;left:190px;text-align:justify" class="search-menu"> <li> <a>First</a> <ul > <li><a>1.1</a></li> <li><a>1.2</a></li> </ul> </li> <li> Second <ul > <li><a>2.1</a></li> <li>2.2</li> </ul> </li> <li> Third <ul > <li>3.1</li> <li>3.2</li> </ul> </li> </ul> </li> </ul> ``` : ``` jQuery('#ScatList').hover(function() { jQuery('#liststart').show(400); }, function() { jQuery('#liststart').hide(); }); jQuery('#liststart >li').hover(function() { jQuery(this).find('ul').show(400); }, function() { jQuery(this).find('ul').hide(); }); jQuery('#liststart >li> ul').hide(); ```
Making simple Nested List where sublist appear to side of the main list
CC BY-SA 3.0
null
2011-04-21T10:31:10.703
2011-04-21T11:37:07.393
2011-04-21T11:37:07.393
669,044
327,504
[ "javascript", "jquery" ]
5,743,027
1
null
null
11
23,843
i was draw a pie chart using canvas in android and using the below code i draw a text on each slice of that pie chart (draw arc on path), now i want to draw the text length wise i.e. from center to end of the each slice,so how to rotate the arc using start and sweep angle. ``` p.addArc(mEventsRect, fStartAngle, fSweepAngle); mBgPaints.setColor(iTextColor); canvas.drawTextOnPath(sTextValue, p, fHOffSet, fVOffSet, mBgPaints); ``` ![enter image description here](https://i.stack.imgur.com/Dlf4J.png)
how to rotate text using canvas in Android
CC BY-SA 3.0
0
2011-04-21T10:46:23.400
2023-02-15T19:06:08.803
null
null
525,004
[ "android", "canvas", "path", "geometric-arc" ]
5,743,051
1
null
null
1
1,205
I am trying to put a custom view inside an NSMenuItem and this is result I get: ![enter image description here](https://i.stack.imgur.com/hSGc2.png) How can I remove the white padding on top and on the right hand side? Thanks.
NSMenuItem custom view problems
CC BY-SA 3.0
null
2011-04-21T10:48:39.153
2011-04-21T11:22:27.073
null
null
635,064
[ "objective-c", "cocoa", "nsview", "nsmenuitem", "nsmenu" ]
5,743,116
1
null
null
2
163
I have a popup panel which shows nice on chrome and FF like this: ![enter image description here](https://i.stack.imgur.com/bvlZc.gif) It's a grey iframe with this css style: ``` element.style { z-index: 25000; opacity: 0.5; position: absolute; background-color: black; border-width: 0px; top: 0px; left: 0px; width: 1366px; height: 361px; visibility: visible; } ``` which contains a DIV: ``` element.style { position: absolute; z-index: 25001; background-color: transparent; left: 0px; top: 0px; width: 1366px; height: 361px; } ``` which contains another (main) white div: ``` element.style { width: 400px; overflow-y: auto; overflow-x: hidden; z-index: 25002; visibility: visible; position: absolute; left: 483px; top: 77px; } ``` I do not understand , so basically it should be in the background like on Chrome...: ![enter image description here](https://i.stack.imgur.com/EK46w.gif) Do you have any clue? I'm almost sure the problem is on the panel with the tabs and not on the popup one... The css of the panel with the tabs is: ``` element.style { width: 280px; height: 500px; position: relative; } ``` Panel tab is actually a table with the above style. Ps: Do not blame me about css for the popup. Is mainly generated by the icefaces component.
strange CSS issue
CC BY-SA 3.0
null
2011-04-21T10:54:14.167
2011-04-21T11:53:12.717
2011-04-21T11:15:48.523
174,349
174,349
[ "html", "css" ]
5,743,205
1
5,743,268
null
0
111
I have a TreeView for my administrator-area as menu. Here is how it looks like at the moment: ![Image](https://i.stack.imgur.com/ZIM7gm.jpg) Here is how it should look: ![Image](https://i.stack.imgur.com/sqtaC.jpg) So I want to have more than one "MainNodes". My TreeView have a Sitemap in Background (I need this for my SiteMapPath-control, so I can't delete it and do it without sitemap). The Sitemap only have 1 "MainNode" and x "Undernodes" with again unendlos "Undernodes". What can I do?
How do I have more than One "Main Node"?
CC BY-SA 3.0
null
2011-04-21T11:02:27.480
2013-06-09T22:52:46.863
2013-06-09T22:52:46.863
1,711,796
133,584
[ "asp.net", "treeview", "sitemap" ]
5,743,412
1
5,745,704
null
1
2,583
I'm having problems performing an insert and continually receive the error `Invalid object name 'dbo.atomic.address'`. As you can see within the atomic database address does exist: ![enter image description here](https://i.stack.imgur.com/DWRa4.png) This is the `CreateAddress` function. I am passing nulls into `addressline3` and `addressline4`. I have wondered if this might be the problem. I have checked the .tt templates and the `Address` object doesn't have these marked as `Nullable` - problem? ``` public static int CreateAddress(string addressline1, string addressline2, string addressline3, string addressline4, string postcode, int cityid, int countryid, int clientid, string tag, bool active, string notes = null) { using (var ctx = new atomicEntities()) { var a = new Address { ClientId = clientid, AddressTag = tag, AddressLine1 = addressline1, AddressLine2 = addressline2, AddressLine3 = addressline3, AddressLine4 = addressline4, CityId = cityid, Postcode = postcode, CountryId = countryid, AddressNotes = notes, Active = active, Token = DateTime.UtcNow }; ctx.Connection.Open(); ctx.Addresses.AddObject(a); ctx.SaveChanges(); return a.AddressId; } } ``` Just for reference, this is the error I receive with the stack: ![enter image description here](https://i.stack.imgur.com/WGS6G.png) Also, the data I am inserting is as follows: ![enter image description here](https://i.stack.imgur.com/YaPSm.png) BusinessStreet2 is empty, but I can confirm that even when populated the error still occurs. Any help or suggestions welcome on how to make this work! :D I have read that it might be a plural or singular issue, but I can't see where I am going wrong? Xml from Atomic.edmx: ``` <EntityContainer Name="atomicModelStoreContainer"> <EntitySet Name="address" EntityType="atomicModel.Store.address" store:Type="Tables" Schema="dbo" /> </EntityContainer> <EntityType Name="address"> <Key> <PropertyRef Name="address_id" /> </Key> <Property Name="address_id" Type="int" Nullable="false" StoreGeneratedPattern="Identity" /> <Property Name="client_id" Type="int" Nullable="false" /> <Property Name="address_tag" Type="nvarchar" MaxLength="50" /> <Property Name="address_line_1" Type="nvarchar" MaxLength="255" /> <Property Name="address_line_2" Type="nvarchar" MaxLength="255" /> <Property Name="address_line_3" Type="nvarchar" MaxLength="255" /> <Property Name="address_line_4" Type="nvarchar" MaxLength="255" /> <Property Name="city" Type="int" /> <Property Name="postcode" Type="nvarchar" MaxLength="12" /> <Property Name="country" Type="int" /> <Property Name="address_notes" Type="nvarchar" MaxLength="500" /> <Property Name="active" Type="bit" Nullable="false" /> <Property Name="token" Type="datetime" /> </EntityType> ```
Entity Framework throws strange 'Invalid object name' error
CC BY-SA 3.0
null
2011-04-21T11:25:59.773
2011-04-21T14:46:28.007
2011-04-21T13:33:31.420
102,147
102,147
[ "c#", "sql-server", "entity-framework-4" ]
5,743,564
1
null
null
1
4,373
``` var raphael_test=function(){ var canvas = Raphael("my-canvas", width, height); return { startToDraw: function(){ //canvas.clear() //Error happend when mouse click more than once canvas.rect(10, 10, 50, 50); } }; }(); ``` : ``` var btn=$('#btn'); btn.click(function(){ raphael_test.startToDraw(); }); ``` index.html: ``` <body> <div id="my-canvas"></div> <input type="button" id="btn"></input> <script src="raphael-min.js"></script> <script src="myraphael.js"></script> <script src="draw.js"></script> </body> ``` Every time when button clicked, I would like to first the previous draw, then draw the rectangular again. I implement the part before `canvas.rect(10, 10, 50, 50);` . But when mouse click on the button more than once, I got error from firebug: ![enter image description here](https://i.stack.imgur.com/UqjUR.png) is the Raphael library download from raphael official page. I don't understand this error, and have no idea how to get rid of it...
Raphael.js, problem with clear the canvas
CC BY-SA 3.0
null
2011-04-21T11:40:22.770
2011-04-21T14:02:30.387
2011-04-21T14:02:30.387
475,850
475,850
[ "javascript", "raphael", "javascript-framework" ]
5,743,546
1
null
null
2
6,073
Data for jquery datatable is being generated using javascript function which parses JSON data returned by python. Resultant HTML Table in the browser shows up correctly, but jquery datatable cannot recognize the data and datatable functionality is not working. When I look at the HTML Page source, I cannot see the data in the table either. ``` /* Define two custom functions (asc and desc) for string sorting */ jQuery.fn.dataTableExt.oSort['string-case-asc'] = function(x,y) { return ((x < y) ? -1 : ((x > y) ? 1 : 0)); }; jQuery.fn.dataTableExt.oSort['string-case-desc'] = function(x,y) { return ((x < y) ? 1 : ((x > y) ? -1 : 0)); }; $(document).ready(function() { $('#datatable_for_current_users').dataTable( { "aaSorting": [ [3,'desc'] ], "aoColumns": [ null, null, { "sType": 'string-case' }, null ] }); }); ``` ``` <div id="your_city"> <!-- Table containing the data to be printed--> <table cellpadding="0" cellspacing="0" border="0" class="display" id="datatable_for_current_users"> <thead> <tr> <th>Country</th> <th>City</th> <th>Status</th> <th>Reported at</th> </tr> </thead> <tbody> <!-- contents of the tbody will be loaded by javascript method XXX --> </tbody> </table> </div> ``` Here javascript sends users country and city to python code. Python code then finds out the database objects for the particular user and send out JSON data back to javascript. ``` $.post("/AjaxRequest", { selected_country_name: $users_country, selected_city_name: $users_city }, function LoadUsersDatatable(data) { var tbody = $("#datatable_for_current_users > tbody").html(""); jsonData = jQuery.parseJSON(data); for (var i = 0; i < jsonData.length; i++) { var citydata = jsonData[i]; var rowText = "<tr class='gradeA'><td>" + citydata.city.country.country_name + "</td><td>" + citydata.city.city_name + "</td><td>" + citydata.status + "</td><td>" + citydata.date_time.ctime + "</td></tr>"; $(rowText).appendTo(tbody); } } ); ``` ``` <tbody> <!-- contents of the tbody will be loaded by javascript method XXX --> </tbody> ``` And to me this appears to be the problem In the browser however, I see the table being loaded correctly, the datatable however shows 0 entries and search sort functionality empties the table ![enter image description here](https://i.stack.imgur.com/5cYBB.png)
jQuery Datatable functionality not working when table data is populated by using Javascript
CC BY-SA 3.0
null
2011-04-21T11:38:49.520
2014-02-23T16:31:57.853
2012-11-06T10:48:28.633
887,539
639,582
[ "javascript", "jquery", "jquery-plugins" ]
5,744,012
1
5,744,574
null
2
5,744
I want to convert a small win-form app to WPF App. I am using linq-sql and below is the dbml file ![enter image description here](https://i.stack.imgur.com/Jha6k.png) This is my xaml code file in which I have 1 combobox and other textboxes ``` <ComboBox Height="23" IsDropDownOpen="False" Margin="107,52,281,0" Name="cbx_contact" VerticalAlignment="Top" /> <Label Height="17" HorizontalAlignment="Left" Margin="25,55,0,0" VerticalAlignment="Top" Width="72">Contact :</Label> <TextBox Height="23" Margin="107,85,281,0" Name="txt_name" VerticalAlignment="Top" /> <Label Height="23" HorizontalAlignment="Left" Margin="25,89,0,0" Name="label2" VerticalAlignment="Top" Width="72">Name* :</Label> <TextBox Height="23" Margin="107,118,281,0" Name="txt_cellno" VerticalAlignment="Top" /> <Label Height="23" HorizontalAlignment="Left" Margin="25,121,0,0" Name="label3" VerticalAlignment="Top" Width="72">Cell No.* :</Label> <TextBox Height="23" Margin="107,0,281,173" Name="txt_add1" VerticalAlignment="Bottom" /> <Label Height="18.025" HorizontalAlignment="Left" Margin="25,0,0,176" Name="label4" VerticalAlignment="Bottom" Width="72">Address1 :</Label> <TextBox Height="23" Margin="107,0,281,140" Name="txt_add2" VerticalAlignment="Bottom" /> <Label Height="23" HorizontalAlignment="Left" Margin="25,0,0,138" Name="label5" VerticalAlignment="Bottom" Width="72">Address2 :</Label> <TextBox Height="23" Margin="107,0,281,107" Name="txt_city" VerticalAlignment="Bottom" /> ``` ![This is the design ](https://i.stack.imgur.com/JycOo.png) I want to bind the ComboBox to the contact table with display member "Name" and value member "ContactID" I tried different-different methods but nothing is working for me... here's the code which gives error ``` DataClasses1DataContext db = new DataClasses1DataContext(); var sel = from contact in db.Contacts select new { contactid = contact.ContactID, name = contact.Name }; cbx_contact.ItemsSource = sel; cbx_contact.DisplayMemberPath = "name"; cbx_contact.SelectedValuePath = "contactid"; ``` I am getting the following error : Cannot create instance of 'Contact_form' defined in assembly 'WpfApplication2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'WpfApplication2;component/Contact_form.xaml' Line 1 Position 7. And please give me links of good examples of binding wpf gridview. listview and combobox
WPF combobox binding using linq
CC BY-SA 3.0
null
2011-04-21T12:20:54.280
2018-04-14T13:13:56.187
2018-04-14T13:13:56.187
1,033,581
406,427
[ "c#", "wpf", "linq", "combobox", "binding" ]
5,744,065
1
5,744,293
null
3
14,127
In my app, I have a `Spinner`, that can be filled with two `Array`s of `Strings`, stored in my `values/strings.xml` resource. Depending on the state of two RadioButtons, the values from the correct Array is selected and my Spinner gets filled. For each Array of Strings, I have an Array of Icons which have the same size. All of my icons start with an "A" and are followed by a number. I can't change this, it's stored like that in the database. I have an Array in Strings.xml with all the numbers I require to draw the icons. All the actual icons can be found in the `drawable` resource folder. Now I want to show the corresponding item next to the String from the list which was selected by the Spinner. When an item gets selected, I just need to see the text. I have searched the Internet for a good tutorial, but with what I have found I have not succeeded in doing this. I'm just beginning in Android programming so I think I need a little help. I hope that somebody can guide me in the right direction. I put my String Array within actual Arrays, such as: ``` // Arrays with each function in text arbeiderjobs = getResources().getStringArray(R.array.arbeiders); bediendejobs = getResources().getStringArray(R.array.bediende); // Arrays with each function ID arbeiderjobsid = getResources().getIntArray(R.array.arbeidersid); bediendejobsid = getResources().getIntArray(R.array.bediendeid); ``` When one of the RadioButtons gets selected, I use the following event handler code: ``` // RadioButton 'Arbeider': If a value gets chosen in this list, // the corresponding ID is put in the below variable RadioButton rbArbeider = (RadioButton) findViewById(R.id.rbArbeider); rbArbeider.setOnCheckedChangeListener(new OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked) { showSpinner(arbeiderjobs, R.id.cmbFuncties); s.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) { functie = arbeiderjobsid[position]; statuut = 1; visible = false; } }); visible = true; } } // s.setOnItemSelectedListener }); // rbArbeider.setOnCheckedChangeListener ``` This is my `showSpinner` method: ``` private void showSpinner(String [] jobs, int id) { MyCustomAdapter adapter = new MyCustomAdapter ( FindJob.this, R.layout.spinnerrow, jobs ); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); for (int i = 0; i < jobs.length; i++) { adapter.add(jobs[i]); } Spinner s = (Spinner) findViewById(id); s.setClickable(true); s.setAdapter(adapter); } ``` I've made a custom adapter based on [this tutorial](http://android-er.blogspot.de/2010/06/custom-arrayadapter-with-with-different.html), but I'm kind of tangled in it... I need some help: ``` public class MyCustomAdapter extends ArrayAdapter<String> { public MyCustomAdapter(Context context, int textViewResourceId, String[] objects) { super(context, textViewResourceId, objects); } @Override public View getDropDownView(int position, View convertView, ViewGroup parent) { return getCustomView(position, convertView, parent, arbeiderjobs, arbeiderjobsid); } @Override public View getView(int position, View convertView, ViewGroup parent) { return getCustomView(position, convertView, parent, arbeiderjobs, arbeiderjobsid); } public View getCustomView(int position, View convertView, ViewGroup parent, String jobs[], int jobsid[]) { // return super.getView(position, convertView, parent); LayoutInflater inflater = getLayoutInflater(); View row = inflater.inflate(R.layout.spinnerrow, parent, false); TextView label = (TextView) findViewById(R.id.functie); label.setText(jobs[position]); ImageView icon = (ImageView) row.findViewById(R.id.icon); String uri = "@drawable/a" + jobsid[position]; int imageResource = getResources().getIdentifier ( uri, null, getPackageName() ); icon.setImageResource(imageResource); if (visible) { icon.setVisibility(View.GONE); } return row; } } ``` This is what I would want it to look like: ![Result](https://i.stack.imgur.com/qMupq.png)
Spinner with Text and Icons
CC BY-SA 3.0
null
2011-04-21T12:24:31.567
2012-08-21T09:49:24.453
2012-08-21T09:49:24.453
132,735
696,892
[ "android", "text", "icons", "spinner" ]
5,744,117
1
5,753,555
null
10
868
Yesterday, while adding some timing plots to the ["Optimally picking one element from each list"](https://stackoverflow.com/questions/5645342/optimally-picking-one-element-from-each-list/5730495#5730495) question I was once more remembered of a mathgroup posting I did a couple of years ago (["Keeping plot annotations after regenerating a plot"](http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_frm/thread/e2022dc734fb2ff0)). I was happily annotating my plots (manually) when I thought that some axis labels would be nice. Problem is, regenerating the plots with the axis labels in place will destroy your manual annotations. It appears you can find user additions in a plot named pic here: `Rest[pic[[1, 1]]]`, so if you regenerate the plot as pic2 you can get your annotations back if you use: ``` Insert[pic2, Rest[pic[[1, 1]]], {1, 1}] ``` I remember David Park (author of the Presentations package) being vehemently opposed to manual annotations. I have done quite some programmatic labeling myself, but sometimes placing labels under program control is just too difficult, like here (note that I don't like `PlotLegends` much, especially because some of the colors are close to each other): ![top-answerers](https://i.stack.imgur.com/Egsqt.png) It was already too late for my kludge, having thrown away the plot originals, but I wonder what the current state of thinking on this issue is. - - - - BTW The trick in my mathgroup posting differed slightly from the one shown above and used in the top-10 plot. The principle is the same, though. --- I placed the code to make SO data plots like the one above in the [Mathematica Toolbag](https://stackoverflow.com/questions/4198961/what-is-in-your-mathematica-tool-bag/5744972#5744972). The code is now moved to the more appropriate question by Brett Champion: [How do I access the StackOverflow API from Mathematica](https://stackoverflow.com/q/5745298/615464)
Saving plot annotations
CC BY-SA 3.0
0
2011-04-21T12:29:35.780
2011-04-26T07:55:17.897
2017-05-23T11:54:05.047
-1
615,464
[ "wolfram-mathematica" ]
5,744,149
1
5,744,382
null
5
7,370
PLs tell me how i can hide header of tabpanel "..." if my tabpanel have only one tab? I can't use Ext.Panel becose I use fairly sophisticated methods for generating extjs code on the server, and there is a large number of design errors that do not allow me to generate the usual Ext.Panel for this case. ![enter image description here](https://i.stack.imgur.com/n0FHR.png) tnx all, Solution: i add to css rules ``` .strip-hidden .x-tab-strip-wrap { display: none; } .strip-show .x-tab-strip-wrap { display: block; } ``` and on server side (delphi, something like ExtPascal) ``` if (frmContainer.Tab.Items.Count = 1) then frmContainer.Tab.Cls := 'strip-hidden' else frmContainer.Tab.Cls := 'strip-show'; ``` So, it's work for me (chrome, firefox). i add 2 rules becose i have windows in windows, so if child windows have many tabs - it will be hidden by css rule of parent window. so i have 2 rules and it works.
ExtJS 3.2.0, hide tabpanel's header
CC BY-SA 3.0
0
2011-04-21T12:31:31.583
2014-08-01T00:59:51.900
2011-04-21T15:29:48.370
671,228
671,228
[ "javascript", "extjs", "tabpanel" ]
5,744,277
1
5,744,374
null
4
2,622
I'm trying to make the layout of a checklist, which has this type of row: ![enter image description here](https://i.stack.imgur.com/5GeCF.png) Where: - - - - - This is my layout.xml: ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_vertical"> <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" /> <LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="60dp" android:layout_weight="1" android:paddingRight="6dp" android:gravity="center_vertical"> <TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="6dp" android:gravity="center_vertical" android:textAppearance="?android:attr/textAppearanceMedium" android:singleLine="true" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="6dp" android:gravity="center_vertical" android:textAppearance="?android:attr/textAppearanceSmall" android:singleLine="true" /> </LinearLayout> <TextView android:layout_width="wrap_content" android:layout_height="60dp" android:layout_weight="2" android:layout_marginLeft="6dp" android:layout_marginRight="6dp" android:gravity="center_vertical|right" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#2B78E4" /> </LinearLayout> ``` And I'm getting this result: ![enter image description here](https://i.stack.imgur.com/elpiG.png) The first row has very long content on B and C, and so D is not appearing at all. The second row has long content, but shorter than first's, and so D is shrinked. The third row has short content, and D is displayed correctly. How could I modify my layout so D is always displayed correctly, and B&C will be filling only the available space?
Checklist layout with a fixed part
CC BY-SA 3.0
null
2011-04-21T12:44:32.640
2011-04-21T14:28:36.163
null
null
267,705
[ "android" ]
5,744,801
1
5,744,854
null
13
39,980
I'm having a problem positioning an absolute div outside a table, I'm not a big fan of table layout but I found an existing project with a table layout. The code is as follows ``` <td colspan="2" align="right" style="padding-top:3px; padding-right:15px; padding-bottom:15px;" width="600px"> <table cellpadding="0" cellspacing="0" border="0"> <tr><td height="37px" width="600px" style="background-image:url('P--IMG--P/welcomepanel/header.png'); background-repeat:no-repeat; background-position:bottom left;"><span class="heading" id="I--heading_text--I" style="padding-top:3px;"></span></td></tr> <tr> <td align='left' valign='middle' width="600px" height="522px" style="background-image:url('P--IMG--P/welcomepanel/middelblock_repeat.png'); background-repeat: repeat-y; padding-top:0px"> <div height="500px" width="580px" style="width:600px; text-align:left; height:500px; overflow-y:scroll; overflow-x:none;"> [--C--comp--C--] </div> </td> </tr> <tr><td><img src="P--IMG--P/welcomepanel/middelblock_roundcorners.png"/></td></tr> </table> </td> ``` Where `[--C--comp--C--]` is the replacement string for an fckEditor that contains an image inside a div, I have set that div's z-index to 10 but it doesn't want to go out of the table.. and its position absolute. Please let me know what I might be doing wrong. I've realised that the problem comes with the overflow-scroll on the td container, if you remove the `overflow-y:scroll` it works fine, but the problem is that I need to have that overflow since there is a lot of content inside that td. I don't know what to do now. :(..someone please help a brother out! ![enter image description here](https://i.stack.imgur.com/XCRHj.jpg) I need the small map to be outside the table and the big map to remain inside the table, it shows the small image when you hover on the big map using Jquery to zoom, which is loaded on the fckeditor. I hope this helps..
Z-index not working inside a table if there is an overflow-scroll on container
CC BY-SA 4.0
0
2011-04-21T13:31:44.693
2019-02-08T18:51:04.710
2019-02-08T18:51:04.710
3,415,679
88,068
[ "html", "css", "html-table", "z-index" ]
5,744,964
1
5,745,213
null
3
1,492
I have an action sheet that is causing me grief on the iphone in Landscape orientation. Everything displays just fine, but in Landscape, the first real button has the same index as the cancel button and so the logic doesn't work. I've tried creating the actionSheet using initWithTitle: delegate: cancelButtonTitle: destructiveButtonTitle: otherButtonTitles: but that was just the same, my current code is as follows; ``` UIActionSheet* actionMenu = [[UIActionSheet alloc] init]; actionMenu.delegate = self; actionMenu.title = folderentry.Name; actionMenu.cancelButtonIndex = 0; [actionMenu addButtonWithTitle:NSLocalizedString(@"str.menu.cancel",nil)]; [self addActiveButtons:actionMenu forEntry:folderentry]; [actionMenu showInView:[self.navigationController view]]; [actionMenu release]; ``` The addActiveButtons method basically configures which buttons to add which it does using code like this; ``` [menu addButtonWithTitle:NSLocalizedString(@"str.menu.sendbyemail",nil)]; ``` There are perhaps 6 buttons at times so in landscape mode the actionSheet gets displayed like this; ![action sheet](https://i.stack.imgur.com/SP7GE.png) My delegate responds like this; ``` - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { NSLog(@"Cancel Button Index is : %d",actionSheet.cancelButtonIndex); NSLog(@"Button clicked was for index : %d",buttonIndex); NSString *command = [actionSheet buttonTitleAtIndex:buttonIndex]; DLog(@"COMMAND IS: %@ for index: %d",command,buttonIndex); if ([command isEqualToString:NSLocalizedString(@"str.menu.sendbyemail",nil)]) { // Do stuff here } if ( ... similar blocks ... ) { } } ``` In the example shown, I am finding that cancelButtonIndex is 0 as expected, but so is the button index for the first other button! This means if for example, my debug output looks like this; I've tried various permutations and am now tearing my hair out wondering what I'm missing. I've had a good search around but the other problems people seem to be having are display issues, rather than functionality ones. PS. I know this isn't the greatest UI experience, but I figure that most users will actually be in portrait most of the time or using the iPad version of the app so I'm prepared to accept the actionsheet default behaviour for landscape assuming I can get it to actually work!
UIActionSheet in Landscape has incorrect buttonIndicies
CC BY-SA 3.0
null
2011-04-21T13:46:37.937
2011-12-06T20:37:25.247
null
null
294,728
[ "iphone", "ios", "landscape", "uiactionsheet" ]
5,744,996
1
5,745,879
null
7
13,632
I would like to change the white background in a UIPickerView to an image of my own. Is this possible? Also, I have managed to get my UIPickerView to scroll horizontally instead of vertical. Now, I would like to know if there is any way to adjust the spacing between two rows of the picker view? I have attached an image to show what I mean. This is my code: ``` - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. arrayDays = [[NSMutableArray alloc] init]; [arrayDays addObject:@"ONSDAG"]; [arrayDays addObject:@"TORSDAG"]; [arrayDays addObject:@"FREDAG"]; [arrayDays addObject:@"LØRDAG"]; arrayDates = [[NSMutableArray alloc] init]; [arrayDates addObject:@"29. JUNI"]; [arrayDates addObject:@"30. JUNI"]; [arrayDates addObject:@"1. JULI"]; [arrayDates addObject:@"2. JULI"]; pickerViewDay = [[UIPickerView alloc] initWithFrame:CGRectZero]; [pickerViewDay setDelegate:self]; [pickerViewDay setShowsSelectionIndicator:NO]; CGAffineTransform rotate = CGAffineTransformMakeRotation(-M_PI/2); rotate = CGAffineTransformScale(rotate, 0.25, 2.0); [pickerViewDay setTransform:rotate]; [pickerViewDay setCenter:CGPointMake(self.view.frame.size.width/2, (pickerViewDay.frame.size.height/2)-3)]; [self.view addSubview:pickerViewDay]; // Adding selection indicator to pickerview UIImage *selectorImage = [UIImage imageNamed:@"DayPickerView_SelectionIndicator.png"]; UIView *customSelector = [[UIImageView alloc] initWithImage:selectorImage]; [customSelector setFrame:CGRectMake(0, 0, 120, 74)]; [customSelector setCenter:CGPointMake(self.view.frame.size.width/2, customSelector.frame.size.height/2)]; [self.view addSubview:customSelector]; [customSelector release]; // Adding background to pickerview UIImage *backgroundImage = [UIImage imageNamed:@"DayPickerView_Background.png"]; UIView *custombackground = [[UIImageView alloc] initWithImage:backgroundImage]; [custombackground setFrame:CGRectMake(0, 0, 320, 74)]; // [self.view addSubview:custombackground]; [custombackground release]; } - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { UIView *viewRow = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 150, 80)]; CGAffineTransform rotate = CGAffineTransformMakeRotation(3.14/2); rotate = CGAffineTransformScale(rotate, 0.25, 2.0); // Date CGRect rectDate = CGRectMake(30, 0, 150, 80); UILabel *date = [[UILabel alloc]initWithFrame:rectDate]; [date setTransform:rotate]; [date setText:[arrayDates objectAtIndex:row]]; [date setFont:[UIFont fontWithName:@"Arial-BoldMT" size:37.0]]; [date setShadowColor:[UIColor whiteColor]]; [date setShadowOffset:CGSizeMake(0, -1)]; [date setTextAlignment:UITextAlignmentCenter]; [date setBackgroundColor:[UIColor clearColor]]; [date setClipsToBounds:YES]; [viewRow addSubview:date]; // Day CGRect rectDay = CGRectMake(-30, 0, 150, 80); UILabel *day = [[UILabel alloc]initWithFrame:rectDay]; [day setTransform:rotate]; [day setText:[arrayDays objectAtIndex:row]]; [day setFont:[UIFont fontWithName:@"Arial-BoldMT" size:21.0]]; [day setTextColor:[UIColor colorWithRed:0.35 green:0.35 blue:0.35 alpha:1]]; [day setTextAlignment:UITextAlignmentCenter]; [day setBackgroundColor:[UIColor clearColor]]; [day setClipsToBounds:YES]; [viewRow addSubview:day]; return viewRow; } - (NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { return [arrayDays objectAtIndex:row]; } - (NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component { return [arrayDays count]; } ``` ![Example](https://i.stack.imgur.com/1fUiZ.png) For RickiG (on background): ![@RickiG: Backgrounds are messed up and there are gaps](https://i.stack.imgur.com/aqN5s.png) For RickiG: ![@RickiG: Gaps in each side of the pickerview](https://i.stack.imgur.com/gyZoh.png)
Customizing UIPickerView (background and spacing)
CC BY-SA 3.0
0
2011-04-21T13:49:19.803
2014-02-01T05:01:12.267
2011-04-22T11:07:11.580
486,845
486,845
[ "iphone", "sdk", "background", "uipickerview" ]
5,745,160
1
null
null
2
1,419
I'm having trouble in design layout css with div element. Basically my main page layout design is look like the following picture : ![enter image description here](https://i.stack.imgur.com/gXmTw.jpg) The red box is the browser screen area. The black box is the content area where the data will included / or loaded via ajax. The green box is the data list which is the response result and contain about hundred rows inside. The data list contain header div and rows divs. What i intend to do is set the overflow on the blue area which is the data rows so the scrollbar will appear on the right side of the blue box not on the right side of the red or black box. Then when the browser area (red) resized all the div inside will also resized to the best size. I've managed to make the scroll bar appear on the blue box when the data inside is overflow by set css overflow : auto /scroll for blue box div. But the problem is the overflow : auto properties seems only work when i set a certain height for the blue box div let's say about 400px. When i resize the browser the blue box div keeps stay with 400px height. How to make it auto resize? Thanks in advance for any help.
css liquid layout with div overflow inside
CC BY-SA 3.0
null
2011-04-21T14:01:57.957
2011-04-21T16:47:42.347
2011-04-21T14:06:53.233
121,493
718,507
[ "css", "layout", "html", "overflow", "liquid" ]
5,745,509
1
null
null
1
2,827
*** Updated *** Great discussion everyone, again thanks for the input I just want to share the information with other developers/programmers and talk about the possible solutions. I've come up with another clever little trick that could work as well. It's an old way of going server-side/client-side in asp, that can still be done in .NET (not that this is proper, but in the end 'they' just want it to work) Here it is: ![enter image description here](https://i.stack.imgur.com/2N4Tf.gif) This is more of a discussion than a question, but does any know of some specific IE 9 CSS hacks. I don't want to use a separate style sheet, but was wondering if there we any IE 9 hacks out yet. For example you can do the following for the other IE's ``` _CSS_thing {css} /** IE 6 **/ *CSS_thing {css} /** IE 7 **/ .CSS_thing {margin-top:0px/0\} /** IE 8 -- could be wrong on the /\ format is one of those ways don't really use that one. **/ ```
IE 9 css issues or css-hacks
CC BY-SA 4.0
0
2011-04-21T14:31:13.377
2022-09-28T14:21:39.973
2022-09-28T14:21:39.973
2,756,409
455,483
[ "css", "internet-explorer" ]
5,745,686
1
5,745,725
null
2
648
Hey guys. This is my table of how it works: ![enter image description here](https://i.stack.imgur.com/o2pa3.png) I want to be able to count the number of views (the views are unique which contains user's IP), for records that matches record in another table, for example I do a `GET` request and a SQL query will find matches and count the number of views that have been collected for each record, so it'll display something like this: `stack` ``` record_id | keyword | total_views ---------------------------------------------------- 2 | stack | 2 ---------------------------------------------------- 5 | stack | 1 ``` As you can see in the table there are `2` views for `record_id` `2` and `1` view for `record_id` `5`, and so on. Do you get what I mean? I'm having trouble knowing how to do this. Cheers.
Counting one table of records for matching records of another table
CC BY-SA 3.0
0
2011-04-21T14:44:59.777
2011-04-21T14:48:16.527
null
null
264,795
[ "php", "mysql", "count", "join" ]
5,746,445
1
5,746,588
null
0
5,877
I have been trying to fix this for a while but I have had no luck. I have a facebook app (witdh: 510) that keeps including scroll bars. This is how it looks in facebook: ![Facebook App with white scroll bars](https://i.stack.imgur.com/XkcTZ.png) There is nothing in my application that will has a width greater then 510, so I am confused as to why there is white space in the first place. I also do not understand why there is a vertical scroll bar because there is clearly enough room on page to fit the app. In my settings for the app Auto resize is called and I have `FB.Canvas.setAutoResize();` in my `window.fbAsyncInit` function. I also tried using a CSS Reset `<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.3.0/build/cssreset/reset-min.css">` but that did not clear the issue. Any suggestions?
Facebook IFrame Auto Resize Still Including Scroll Bars
CC BY-SA 3.0
0
2011-04-21T15:42:16.863
2011-04-27T20:44:58.787
null
null
650,489
[ "css", "facebook", "facebook-iframe" ]
5,746,467
1
5,746,480
null
6
7,285
I would like to calculate the vertical position of a `<div>` with jQuery. How would I do this? Here's an illustration describing what I mean: ![enter image description here](https://i.stack.imgur.com/eSJVl.png)
Calculate element-position
CC BY-SA 3.0
0
2011-04-21T15:44:05.037
2012-04-26T15:55:07.357
2011-04-21T15:46:15.783
464,744
403,085
[ "javascript", "jquery", "html" ]