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,879,566
1
5,905,734
null
0
576
I have a whole bunch of Unit tests and coded UI Tests setup in my project, all running only on my local box (although they are all in TFS). Everything was working fine until I added a new CodedUI Test - suddenly none of my Coded UI Tests will work, they are all throwing the same exception: ![Exception screenshot](https://i.stack.imgur.com/AhRac.gif) Can anybody help? ## Edit Okay, have discovered that adding `Playback.Initialize();` in my `TestMethod` allows it to run. So why has the built in engine stopped calling this method?
CodedUI Tests suddenly throwing exceptions in Visual Studio 2010
CC BY-SA 3.0
null
2011-05-04T06:44:21.043
2011-05-06T00:53:47.140
2011-05-06T00:31:41.237
701,603
701,603
[ "c#", "visual-studio-2010", "coded-ui-tests" ]
5,879,611
1
5,879,638
null
0
63
Me and my friend were trying to make a webpage in C#. This webpage has features like log in, log out and register. So we tested it on his computer, and everything worked fine. But then when I tried to test the code on my computer, I think the .sql file has some errors. Some of them are: ![enter image description here](https://i.stack.imgur.com/pXqkh.jpg) ![enter image description here](https://i.stack.imgur.com/4kOZd.jpg) ![enter image description here](https://i.stack.imgur.com/Q9ibe.jpg) ![enter image description here](https://i.stack.imgur.com/sUOH0.jpg) I have no idea if I am missing something like heading or setting. I searched in google and added "using System.Data.SqlClient;" to every aspx pages but nothing helped. I hope you guys know what problem is this. Thank you.
Problem with sql for a webpage built in C# by using Microsoft Visual Studio 2010
CC BY-SA 3.0
null
2011-05-04T06:51:20.870
2011-05-04T12:37:57.120
2011-05-04T07:25:14.490
505,594
724,733
[ "c#", "mysql", "sql", "sql-server" ]
5,879,765
1
5,879,985
null
4
7,416
I know this is a silly question, but I would like to know why it is happening so. I am using wamp server version 2.1. While viewing directories in localhost, the images beside the files are not getting loaded. Refer image below. On inspect of the image, I see it fails to load `/icons/folder.gif`, where can I find those images and how to load them? ![enter image description here](https://i.stack.imgur.com/mQf9h.png)
Apache webroot icons not loading
CC BY-SA 3.0
0
2011-05-04T07:09:21.510
2014-10-30T08:27:36.110
2011-05-04T07:42:06.007
434,790
434,790
[ "php", "apache", "icons" ]
5,879,992
1
null
null
1
176
![enter image description here](https://i.stack.imgur.com/H37xm.jpg) I have taken this snapshot from netbeans.what is the method to add vertical gap from jpanel ? (i.e vertical gap from panel to the first component )
leaving gap from top in panel
CC BY-SA 3.0
null
2011-05-04T07:28:00.397
2011-05-04T07:35:02.023
null
null
682,662
[ "java", "swing", "user-interface" ]
5,879,986
1
null
null
8
7,964
I am working with data from neuroimaging and because of the large amount of data, I would like to use sparse matrices for my code (scipy.sparse.lil_matrix or csr_matrix). In particular, I will need to compute the pseudo-inverse of my matrix to solve a least-square problem. I have found the method sparse.lsqr, but it is not very efficient. Is there a method to compute the pseudo-inverse of Moore-Penrose (correspondent to pinv for normal matrices). The size of my matrix A is about 600'000x2000 and in every row of the matrix I'll have from 0 up to 4 non zero values. The matrix A size is given by voxel x fiber bundle (white matter fiber tracts) and we are expecting maximum 4 tracts to cross in a voxel. In most of the white matter voxels we expect to have at least 1 tract, but I will say that around 20% of the lines could be zeros. The vector b should not be sparse, actually b contains the measure for each voxel, which is in general not zero. I would need to minimize the error, but there are also some conditions on the vector x. As I tried the model on smaller matrices, I never needed to constrain the system in order to satisfy these conditions (in general 0 Is that of any help? Is there a way to avoid taking the pseudo-inverse of A? Thanks thanks again for the help. I can't really show you anything about my data, because the code in python give me some problems. However, in order to understand how I could choose a good k I've tried to create a testing function in Matlab. The code is as follow: ``` F=zeros(100000,1000); for k=1:150000 p=rand(1); a=0; b=0; while a<=0 || b<=0 a=random('Binomial',100000,p); b=random('Binomial',1000,p); end F(a,b)=rand(1); end solution=repmat([0.5,0.5,0.8,0.7,0.9,0.4,0.7,0.7,0.9,0.6],1,100); size(solution) solution=solution'; measure=F*solution; %check=pinvF*measure; k=250; F=sparse(F); [U,S,V]=svds(F,k); s=svds(F,k); plot(s) max(max(U*S*V'-F)) for s=1:k if S(s,s)~=0 S(s,s)=1/S(s,s); end end inv=V*S'*U'; inv*measure max(inv*measure-solution) ``` Do you have any idea of what should be k compare to the size of F? I've taken 250 (over 1000) and the results are not satisfactory (the waiting time is acceptable, but not short). Also now I can compare the results with the known solution, but how could one choose k in general? I also attached the plot of the 250 single values that I get and their squares normalized. I don't know exactly how to better do a screeplot in matlab. I'm now proceeding with bigger k to see if suddently the value will be much smaller. Thanks again, Jennifer ![The image shows the 250 computed. I don't know exactly how to create a scree plot in Matlab.](https://i.stack.imgur.com/IqgLR.jpg) ![squared normalized single values](https://i.stack.imgur.com/fRpt0.jpg)
pseudo inverse of sparse matrix in python
CC BY-SA 3.0
0
2011-05-04T07:27:49.137
2013-07-03T15:42:47.930
2013-07-03T15:42:47.930
97,160
737,514
[ "python", "linear-algebra", "sparse-matrix", "least-squares", "matrix-inverse" ]
5,880,374
1
5,880,568
null
3
2,110
Hej hej, I have a solution with multiple projects (vb.net) , with some projects I have the optino to choose between the configuration: ![enter image description here](https://i.stack.imgur.com/Wg4DR.gif) and in other projects I don't have that option. (I've had the option before). ![enter image description here](https://i.stack.imgur.com/pxdes.gif) Has anyone an idea to show the option again. I can change it in project file (with notepad) but that's not userfriendly :D. Greetz, Jonathan
Visual studio no option to choose between debug and release
CC BY-SA 3.0
null
2011-05-04T08:02:48.577
2011-05-04T08:23:40.417
null
null
637,819
[ "vb.net", "visual-studio-2010", "debugging", "properties", "release" ]
5,880,362
1
null
null
0
145
in the image attached some portion is coming with background as black and i am not able to figure out why. I know i am asking something which is not very descriptive but please if someone can throw some pointers that will help thanks ![enter image description here](https://i.stack.imgur.com/BVTjj.png) Css below (this is what i got from firebug when i focused the black background element) ``` .curResults .tableTopControls { display: block; height: 30px; line-height: 30px; margin: 0 0 5px; width: 100%; } .tableTopControls { font-size: 11px; overflow: hidden; } html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { border: 0 none; font-size: 100%; margin: 0; padding: 0; vertical-align: baseline; } Inherited fromdiv.dataTables_wrapper html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv.table html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv#mainSection_merchandizerContentSection_rsPromotions_recordSetContainer.panel html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv.panel html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv.js-showTitle html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv.tabContent html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv.tabContentWrap html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv. html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv.content html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv.stage html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromdiv.page html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromform#frmHomePage merchandizer.aspx html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited frombody.body_Merchandizer body { font-family: Arial,san-serif; font-size: 13px; line-height: 18px; } body { color: #000000; font-family: Arial,san-serif; font-size: 13px; line-height: 18px; } html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } Inherited fromhtml html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, small, strong, b, u, i, center, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td { font-size: 100%; } ```
css issue background coming as black
CC BY-SA 3.0
null
2011-05-04T08:01:46.340
2011-05-04T09:14:13.670
2011-05-04T08:09:29.337
405,818
405,818
[ "css" ]
5,880,381
1
5,881,019
null
0
1,709
I am studying data warehousing star schema and attribute hierarchies and I am getting confused because the examples of the book do not provide sample data on which to confirm my understanding of things. In the book there is a sales data warehouse with a dimension for products that has the following attribute hierarchy: PRODUCT(AllProducts, ByProductType, OneProduct) See the image below: ![enter image description here](https://i.stack.imgur.com/Zkk7b.jpg) What kind of sample data would go into the product dimension table? PRODUCTS --- AllProducts ByProductType OneProduct --- ?                 ?                       ? ?                 ?                       ? ?                 ?                       ? If I'm not mistaken attributes are table columns or fields and I can't understand how would the data look like in this table If you take the dimension Time from the same image, data can easily be sampled: TIME --- Year Quarter Month Week --- 2010 1           1        1 2010 1           1        2 2010 1           1        3 2010 1           1        4 One other thing I am confused about is how the data looks like in the fact table. In the book it is stated that the fact table would deliberately contain duplicated data. For example to come up with the sales figures of a whole year there is no need to aggregate weekly sales values on the fly because they would have already been calculated. Now if in the time dimension I have a primary key value 1 that represents a year a quarter a month and a week all at once how can I hold the aggregate value of 1 whole year in the fact table? TIME --- ID Year Quarter Month Week --- 1  2010 1           1        1 SALES_FACT_TABLE --- Sales TimeID ProductID --- 1000  1          ?
How is data in dimensional tables and fact tables of a data warehouse star schema?
CC BY-SA 3.0
null
2011-05-04T08:04:00.147
2011-05-04T09:03:00.430
null
null
312,299
[ "attributes", "dimensions", "star-schema" ]
5,880,511
1
5,881,760
null
3
520
I am a subscriber for "Always On" option on Google AppEngine. I do not understand why does GAE have to start new instances when there are already "Always On" instances that are turned on and that have big number of requests at that time. This drives me crazy since it nullifies what I get with the AlwaysOn subscription. Any ideas how to fix this behavior? I have latency problems because of this which I wanted to remove by using AlwaysOn. I am thinking of cancelling subscription since it just does not work. ![List of active instances](https://i.stack.imgur.com/jVgta.png)
AppEngine starts new instances without need for them
CC BY-SA 3.0
0
2011-05-04T08:18:05.100
2011-05-05T07:55:25.127
null
null
145,768
[ "java", "google-app-engine" ]
5,880,503
1
5,912,978
null
5
19,953
We've got a client application that connects to our online MySQL database (5.1.44-community-log) thru a ODBC connector (the server is a managed* dedicated webserver). This works very nice. However I can't get it to work using SSL. This is what I've done so far: I've got the server manager* set up MySQL with SSL, this is 'proven by': ``` mysql> SHOW VARIABLES LIKE '%ssl%'; ``` which results is this response: ``` +---------------+---------------------------------+ | Variable_name | Value | +---------------+---------------------------------+ | have_openssl | YES | | have_ssl | YES | | ssl_ca | /***/mysql-cert/ca-cert.pem | | ssl_capath | | | ssl_cert | /***/mysql-cert/server-cert.pem | | ssl_cipher | | | ssl_key | /***/mysql-cert/server-key.pem | +---------------+---------------------------------+ ``` Question: is the server configured right? I'm guessing it is... I've purchased real certificates (via my server manager). These are in the directory shown above. I've also downloaded the client-cert.pem, client-key.pem and ca-cert.pem from that directory. I've created a new user and then granted it access from any location (for testing) with SSL: ``` GRANT USAGE ON *.* TO 'somevaliduser'@'%' IDENTIFIED BY PASSWORD 'somevalidpass' REQUIRE X509 ``` I've (just downloaded and) installed : [mysql-connector-odbc-5.1.8-winx64.msi](http://dev.mysql.com/downloads/connector/odbc/) (64-bit) as my machine is a 64-bit machine (so that's not what's wrong). And I've created a User DSN configuring it like this (no options set on tabs), which shows it connecting to the server (however not using - nor requesting to do so - SSL) successfully (using some valid user which doesn't requires SSL): ![Connection to MySQL server without using SSL](https://i.stack.imgur.com/8ZmgX.png) So the connection is able to establish, now try using SSL. This is configured like this, which is like I've read about on MySQL.com. So I'm not 100% sure the options set are right. ![Connection to MySQL server using SSL](https://i.stack.imgur.com/hxYBA.png) As you can see it results in a error . Turning on tracing (within the ODBC configuration) also shows this error. Can anyone give me a hint on how to make this work? Even if you know about just a part of the solution?
MySQL connection using ODBC (5.1) with SSL
CC BY-SA 3.0
0
2011-05-04T08:17:13.663
2017-12-13T20:48:43.667
2017-12-13T20:48:43.667
3,885,376
690,645
[ "mysql", "ssl", "odbc", "ssl-certificate", "mysql-management" ]
5,880,771
1
5,880,839
null
2
1,714
I'm trying to print labels using xhtmlrenderer and java printing. However I don't seem to be able to set the resolution correct so the image is printed all edgy. This is my printing code: ``` val paperWidth = 62.0f val paperHeight = 70.0f def print(printable: Printable) { val printJob = PrinterJob.getPrinterJob printJob.setPrintService(printService) val pageFormat = printJob.defaultPage pageFormat.setOrientation(PageFormat.LANDSCAPE) val labelPaper = pageFormat.getPaper labelPaper.setImageableArea(mm2points(0f), mm2points(0f), mm2points(paperWidth), mm2points(paperHeight)) labelPaper.setSize(mm2points(paperWidth), mm2points(paperHeight)) pageFormat.setPaper(labelPaper) val book = new Book book.append(printable, pageFormat) printJob.setPageable(book) val attributeSet = new HashPrintRequestAttributeSet attributeSet.add(new PrinterResolution(300, 300, ResolutionSyntax.DPI)) printJob.print(attributeSet) } ``` ... and this is my generation code: ``` def apply(url:URL):Printable = { val renderer = new XHTMLPanel(UserAgent) renderer.getSharedContext.setDPI(300f) renderer.getSharedContext.setUserAgentCallback(UserAgent) renderer.getSharedContext.setCss(new StyleReference(UserAgent)) renderer.setDocument(url.toExternalForm) new XHTMLPrintable(renderer) } ``` I'm at loss at what's missing here. I try to set dpi both on xhtmlrenderer source and printer target, but nothing seem to make any impact. BTW: I'm trying to print on a Brother QL-560 on Mac OS X. I'm able to print the same image from preview in the same size in very good quality. : Added image example.![Difference between print from Mac Preview and java print api](https://i.stack.imgur.com/uzTio.jpg) : Using xhtmlrenderer to create pdf and then printing through pdf-renderer ([http://java.net/projects/pdf-renderer/](http://java.net/projects/pdf-renderer/)) did the trick. The print is now perfect.
Unable to print in correct resolution
CC BY-SA 3.0
null
2011-05-04T08:40:55.883
2012-05-06T18:43:39.713
2011-05-11T09:47:59.643
151,004
151,004
[ "java", "scala", "printing", "xhtmlrenderer" ]
5,880,916
1
5,881,035
null
0
1,359
I want to create a custom menu, in the buttom of the screen, like this one : ![custom menu](https://i.stack.imgur.com/z3La9.jpg) what is the best ui class should I use, I think it's not a Tabbar ? Toolbar may be ? Any piece of code help to customize will be helpful. thanks.
how to make a custom button menu for iphone app ?
CC BY-SA 3.0
0
2011-05-04T08:53:54.140
2012-01-02T11:56:29.080
2012-01-02T11:56:29.080
918,472
505,392
[ "iphone", "menu" ]
5,881,027
1
5,881,148
null
0
328
I need to build an installer for my application (using Windows Installer technology - MSI file). Requirements for this installer: 1. Embed component in installer (ex: .NET Framework 4.0 Full). 2. Detect the present of this component. 3. If this component is not installed yet, installer will install it before. Installer will display a dialog with info "Installing the component ..." and the component is installed silent. If user cancel to install this component, the installer is also cancelled. 4. After installing this component successful, install the application. Thanks. I download Splash Lite from website: [http://mirillis.com/en/downloads/downloads_splash.html](http://mirillis.com/en/downloads/downloads_splash.html). I like this installer because it matches my requirements. Because I am a newbie, anyone can give me some guides to create an installer like this. Thanks. Some screenshot: ![Detect Component](https://i.stack.imgur.com/dI4Gz.png) PLease help me. Thanks.
Build an installer
CC BY-SA 3.0
null
2011-05-04T09:03:38.293
2011-05-04T10:04:25.253
null
null
253,940
[ ".net", "installation", "windows-installer" ]
5,881,048
1
5,881,645
null
28
8,246
here are the images of the project and target what is the difference between this two? why both are given? ![enter image description here](https://i.stack.imgur.com/DCGEt.png) An image of project.. ![enter image description here](https://i.stack.imgur.com/R7P3I.png) An image of target..
what is the difference between target and project?
CC BY-SA 3.0
0
2011-05-04T09:06:06.810
2018-08-10T11:45:24.413
null
null
563,848
[ "iphone", "cocoa-touch", "xcode", "ipad", "xcode4" ]
5,881,378
1
null
null
0
833
where i can find those functions (image attached) in freeware php editors like netbeans, eclise or aptana or similar ide apps (i use it for php and jquery & css) ![enter image description here](https://i.stack.imgur.com/is93F.png)
Refactor & Reference Similar alternatives in eclipse/aptana/netbeans?
CC BY-SA 3.0
null
2011-05-04T09:33:25.910
2011-05-05T21:04:21.207
null
null
709,917
[ "eclipse", "zend-framework", "netbeans", "ide", "aptana" ]
5,881,872
1
5,897,440
null
45
25,000
I'm very much new to software development. I think layered architecture is a great way to reduce the complexities that arise in the process of object oriented software development and, not to mention, to keep your code organized. I'm interested to learn about Domain Driven Design approach and I've run into some problems to get myself introduced to it (of course, beginner level ones). Here it is - I want to build an application to save person related data in database and display person details in a WPF `DataGrid` (I know, DDD is definitely not for the apps of such scale, but just to keep things simple for an amateur like me). So, I created a domain class "Person", something like – ``` public class Person { public Person(dataType paramA) { this.PropertyA = paramA; } private dataType _fieldA; public dataType PropertyA { //encapsulates _fieldA } public dataType PropertyX { //some code that manipulates private field } private dataType MethodPQR(dataType param) { //some code } } ``` Now, my understanding of DDD says the architecture (the simplest version of it) should be as follows (please, correct me if I'm wrong) - ![enter image description here](https://i.stack.imgur.com/jYvXp.png) Note: 1. I want the DataGrid to be bound to some ObservableCollection, to reflect any kind of changes instantly. 2. It's a WPF application but not necessarily be in MVVM pattern and I deliberately want to use the code behind. My questions are - 1. What kind of codes belong to the Application Layer? 2. My guess is, I should definitely not bind an ObservableColletion of my domain object (i.e. Person) as the ItmsSource of the DataGrid. What type of object then I should extract from the domain object, and how? 3. To keep a decoupling between Presentation Layer and Domain Layer probably there's a convention like never instantiate domain objects directly in the presentation layer. What are the non-direct approaches then? 4. If the code-behind talks to the Application Layer then should the Application Layer talk to the Data Repository? But what if some kind of domain access is needed which is not data access related (may be not in this app, but it may occur, right?) In that scenario, who's that X guy (sub-layer/module) in Domain Layer that the Application Layer should talk to? I know my questions are of very much amateur level, but they are questions indeed, raised from problems I'm facing to get a clear picture. So, if anybody has time, any response will be appreciated. I'm not sure if `Data Repository` should have a reference of `Domain Model`.
Domain Driven Design - how the layers should be organized?
CC BY-SA 4.0
0
2011-05-04T10:20:00.933
2020-12-22T13:35:02.130
2019-11-18T00:19:01.553
446,519
446,519
[ "domain-driven-design", "repository", "code-organization", "project-organization", "layer" ]
5,882,014
1
5,882,120
null
6
19,068
I'm currently working on a customer website and stumbled on this strange error, given the HTML: ``` <p>&nbsp;</p> <p> <span class="indentLeft"> REDACTED&nbsp;A/S&nbsp;har hovedsæde i Århus (foto). </span> </p> ``` Internet Explorer 9 will show the following: ![IE9 Snippet showing whitespace characters](https://i.stack.imgur.com/Ueo90.png) Now, to begin with I thought it was an encoding issue, except IE7,IE8, firefox, chrome and safari shows it correctly. So my question really is... is there something new in Internet Explorer 9 that I'm not aware of, some header of some kind that makes it display HTML entities, or is it my server side encoding? I tried forcibly changing encodings in IE9 with no luck so I'm back to square one.
Why does internet explorer 9 show weird characters on UTF8 and whitespace content?
CC BY-SA 3.0
0
2011-05-04T10:30:17.143
2016-09-28T01:53:01.923
2020-06-20T09:12:55.060
-1
3,287
[ "php", "html", "utf-8", "whitespace", "internet-explorer-9" ]
5,882,183
1
5,882,265
null
0
93
![enter image description here](https://i.stack.imgur.com/sQNet.png) Where do i find this option in Xcode4 ?
iPhone : Unable to find "Two-device specific application" option in Xcode4
CC BY-SA 3.0
null
2011-05-04T10:44:39.013
2011-05-04T10:52:18.417
null
null
664,067
[ "iphone", "ios4", "xcode4" ]
5,882,199
1
5,882,491
null
4
500
I want a cylindrical, spider web like layout: ![](https://i.stack.imgur.com/3Clha.png) I know that I can use canvas to draw this but I also need all portions to be clickable, and canvas is very hard to handle touch for all portion. Ideas?
layout like spider
CC BY-SA 3.0
0
2011-05-04T10:46:15.327
2011-05-12T06:01:06.213
2011-05-12T06:01:06.213
1
624,069
[ "android", "layout" ]
5,882,216
1
5,882,634
null
16
3,784
I'm currently monitoring my running java application with Visual VM: [http://visualvm.java.net/](http://visualvm.java.net/) I'm stressing the memory usage by with -Xmx128m. When running I see the heap size increasing to 128m (as expected) however the used heap converges to approximately 105m before I run into a java heap space error. ![enter image description here](https://i.stack.imgur.com/5jZ1e.png) Why are these remaining 20m, not used?
Java heap size not entirely used
CC BY-SA 3.0
0
2011-05-04T10:47:35.343
2021-07-29T15:00:24.617
2021-07-29T15:00:24.617
5,459,839
715,236
[ "java", "memory", "size", "heap-memory", "visualvm" ]
5,882,538
1
5,883,549
null
2
457
I have tried most of the related `XML*` colour options from the `Fonts and Colors` but can not seem to find the correct one that changes the colour of the blue text in the picture below. In addition, none of them have a blue(or related) colour associated with them. This blue text appears for all `name` attributes. The snippet is from an `app.config` file. What is the correct `Fonts and Colors` option I can use to change the colour of the `name` value? ![Blue text that needs to change](https://i.stack.imgur.com/BsUpb.png)
What is the correct Fonts and Colours option to change of the Xml value in Visual Studio 2010?
CC BY-SA 3.0
null
2011-05-04T11:18:08.173
2012-11-05T04:43:14.443
2012-11-05T04:43:14.443
268,667
268,667
[ "xml", "visual-studio-2010", "fonts", "colors" ]
5,883,508
1
null
null
0
303
I'm implementing a Java EE project, and in my a part of my class diagram i have a association class which link two classes samples( in french Echantillon) and analysis( in french AnalyseElementaire)( N.B: the project is for a chemical laboratory, see the image below) ![enter image description here](https://i.stack.imgur.com/WmQlC.png) after i generated the database with the POWER AMC( POWER AMC is a Sybase product), and using hiberante tools inside eclipse in order to genrate the domain model classes, it generates two classes for Result: the first one is "Result" and the second is ResultId, the last one which manage Result id which is a composite id from the identifiers of the two classes samples and analysis: i would know if it's necessary to create a DAO class for ResultID.
DAO interface in Java EE architetcure
CC BY-SA 3.0
null
2011-05-04T12:39:34.680
2011-05-08T10:46:27.623
2011-05-08T10:46:27.623
383,861
604,019
[ "hibernate", "class", "mapping", "relational-database" ]
5,883,553
1
15,006,157
null
1
772
I have a modal dialog that I show using the following code: ``` private void ShowUpdateDialog(float version, bool breakingChanges, string hint, string storeLink, string changelog, params string[] pars) { var dialog = new UpdatePopupController(this, new RectangleF(20, 20, 550, 600)); dialog.WantsFullScreenLayout = true; dialog.ModalPresentationStyle = UIModalPresentationStyle.FormSheet; dialog.ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal; dialog.ModalInPopover = true; UIDevice.CurrentDevice.BeginGeneratingDeviceOrientationNotifications(); dialog.ShowData(version, breakingChanges, hint, storeLink, changelog, pars); dialog.WillRotate(UIApplication.SharedApplication.StatusBarOrientation, 0); NavigationController.PresentModalViewController(dialog, true); dialog.BecomeFirstResponder(); } ``` I get this result (that is what I expected): ![Modal dialog showing](https://i.stack.imgur.com/RKCk7.jpg) Now I want to implement closing the dialog by taping out of the gray content of the dialog. How can I do it? The dialog itself inherits from UIViewController.
FormSheet modal dialog won't hide
CC BY-SA 3.0
null
2011-05-04T12:42:07.440
2013-02-21T15:36:07.567
null
null
529,206
[ "dialog", "xamarin.ios", "modal-dialog" ]
5,884,265
1
null
null
0
3,128
I am trying to setup a with a custom cell using an and . To accomplish this I added a subview to the custom cell. The data connection seems to work somewhat. Though, there seems to be a redraw problem which I cannot fix. When I load the application only some of the cells are rendered. When I scroll through the rows or select one the rendering changes. I created an [example project on github](https://github.com/johnjohndoe/NSTableViewCustomCell) to illustrate what the problem is. ![Screenshot](https://i.stack.imgur.com/xgmDb.png) The actual source code for the cell rendering can be found [here](https://github.com/johnjohndoe/NSTableViewCustomCell/blob/master/CustomCell.m): ``` // CustomCell.m - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { if (![m_view superview]) { [controlView addSubview:m_view]; } // The array controller only gets wrapped data items pack by the NSObjectTransformer. // Therefore, objectValue returns a NSObjectWrapper. // Unpack the wrapper to retreive the data item. DataItem* dataItem = [(NSObjectWrapper*)[self objectValue] original]; [[m_view name] setStringValue:dataItem.name]; [[m_view occupation] setStringValue:dataItem.occupation]; [m_view setFrame:cellFrame]; } ``` It seems as if the parent `controlView` does not redraw. Can I force it somehow?
How to setup a NSTableView with a custom cell using a subview
CC BY-SA 3.0
0
2011-05-04T13:36:55.347
2011-05-10T13:40:09.717
2011-05-10T08:05:52.433
356,895
356,895
[ "objective-c", "nstableview", "nscell", "nstextfieldcell", "custom-cell" ]
5,884,544
1
null
null
1
698
I want to add a custom button which will generate a random password using APG in one of the Django models. I'm not sure which template I need to overwrite. Any ideas on how this can be accomplished? Here is the screen shot of the admin and the other panel where I want to create the button. ![The admin panel](https://i.stack.imgur.com/s2qdr.jpg) ![The other panel](https://i.stack.imgur.com/lUKE7.jpg)
Django - Adding a custom button to generate a random password using APG
CC BY-SA 4.0
0
2011-05-04T13:56:26.733
2018-06-25T11:12:03.963
2018-06-25T11:12:03.963
1,033,581
738,145
[ "django" ]
5,885,155
1
5,980,673
null
2
866
I have encountered a strange issue. When I update one of my websites to a web service by 1. Updating it or 2. Removal of the service and readding it altogether The intellisense still reports that the type, in this case `Document_Type3` is still the same type of an object generated by the service. I can set my object type to `Document_Type3'. I build the project, no issues. ![enter image description here](https://i.stack.imgur.com/N6ym6.png) However, when I run the project, I get a compiler error saying that that my object which is Document_Type3 doesn't contain the `Order`. ``` Compiler Error Message: CS0117: 'DynamicsNAV.Document_Type3' does not contain a definition for 'Order' Source Error: Line 376: comment.Date = DateTime.Now; Line 377: comment.DateSpecified = true; Line 378: comment.Document_Type = Document_Type3.Order; <-- right here. Line 379: comment.Document_TypeSpecified = true; Line 380: comment.Line_No = i * 1000; ``` The hell it doesn't. I can see it right there. > ``` <xsd:simpleType name="Document_Type"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Quote" /> <xsd:enumeration value="Order" /> </xsd:restriction> </xsd:simpleType> ``` I can set it fine, compile it fine -- but I can't run it. I nuked my temporary files in `C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files` thinking that it perhaps has cached these dynamically generated objects. I rebuilt the project and watched the website reappear, along with the objects, in the temporary directory. When I run it -- same thing -- no compiler error until it actually loads in the browser. An important issue to note is that these services are being returned by Dynamics NAV, and types that have the same name, such as Document_Type, will be appended with a number on the end. In the code, again, Document_Type3 contains `Order` and `Quote`. What the heck is going on?
Web Service types not updating
CC BY-SA 3.0
null
2011-05-04T14:37:14.030
2012-06-14T21:05:36.467
2012-06-14T21:05:36.467
131,345
225,239
[ ".net", "web-services", "dynamics-nav" ]
5,885,292
1
5,885,813
null
6
9,126
I haven't seen a question like this, but if there is one out there that has been answered, please let me know. I have to create an export, using a stored procedure. Unfortunately, at this time, creating this report in SSRS is not possible. What I need to do is dynamically create a pivot table and union it to another - or that's what I thought would work. The raw data works similar to this (I've changed items to protect my company's data): ![Data Sample](https://i.stack.imgur.com/VmiTL.jpg) What they want the data to look like in the report is this (To save space, I didn't use all dates, but you can get the idea): ![Report Sample](https://i.stack.imgur.com/mg7t7.jpg) I've created a temporary table and created two dynamic pivot tables. Both tables will work separately, but once I use a UNION ALL, I receive an error message (I'll add that below). I'm including the code I have used to create the two pivots. Can someone tell me what I'm doing wrong? Is it possible to do this in just one pivot? ``` /* Use dynamic SQL to find all Issue Dates for column headings */ DECLARE @Jquery VARCHAR(8000) DECLARE @query VARCHAR(4000) DECLARE @years VARCHAR(2000) SELECT @years = STUFF(( SELECT DISTINCT '],[' + 'Item 1' + ' ' + (IssueDate) FROM #GroupData GroupData ORDER BY '],[' + 'Item 1' + ' ' + (IssueDate) FOR XML PATH('') ), 1, 2, '') + ']' SET @query = 'SELECT * FROM ( SELECT LocationID, StoreName, StoreState AS State, "Item 1" + " " + (IssueDate) AS IssueDate, MoneyOrder FROM #GroupData GroupData ) MoneyOrderIssued PIVOT (MAX(MoneyOrder) FOR IssueDate IN ('+@years+')) AS pvt' DECLARE @queryMOUsed VARCHAR(4000) DECLARE @MOUsedYear VARCHAR(2000) SELECT @MOUsedYear = STUFF(( SELECT DISTINCT '],[' + 'Item 2' + ' ' + (IssueDate) FROM #GroupData GroupData ORDER BY '],[' + 'Item 2' + ' ' + (IssueDate) FOR XML PATH('') ), 1, 2, '') + ']' SET @queryMOUsed = 'SELECT * FROM ( SELECT LocationID, StoreName, StoreState AS State, "Item 2" + " " + (IssueDate) AS IssueDate, MOUsed FROM #GroupData GroupData )SCRMoneyOrders PIVOT (MAX(MOUsed) FOR IssueDate IN ('+@MOUsedYear+')) AS pvt' SET @Jquery = @query + ' UNION ALL ' + @queryMOUsed EXECUTE (@query) -- Only in here to show that this works w/out UNION ALL EXECUTE (@queryMOUsed) -- Only in here to show that this works w/out UNION ALL EXECUTE (@Jquery) ``` The error message I receive is the following: Warning: Null value is eliminated by an aggregate or other SET operation. Msg 8114, Level 16, State 5, Line 1 Error converting data type varchar to bigint.
Joining Multiple Dynamic Pivot Tables
CC BY-SA 3.0
0
2011-05-04T14:46:41.887
2011-05-04T15:53:33.037
null
null
676,828
[ "sql", "sql-server-2005", "pivot-table" ]
5,885,338
1
5,885,379
null
2
902
I'm designing a program with a server that let's two clients communicate. There's one client that executes commands and another that makes the other client execute them. To make this work, I have two threads: one thread for the controlled-client, another for the controller-client. The controlled-client always stays connected, has a vector with tasks and executes these tasks if a task is added. It has an infinite while loop which is stopped when the connection is closed. The controller-client adds tasks to the vector. Now since there is an vector shared between two threads a race condition may occur, but since one thread only adds objects and the other only pops objects, is that necessary? I tried to make a flowchart with this problem, but maybe it isn't clear. I don't really know how to create a flowchart: ![enter image description here](https://i.stack.imgur.com/RfBPh.jpg) I'm using `std::vector <CustomClass>` from C++ to realize this. Thanks in advance, ief2 EDIT: Additional Question: Does the `vector.size()` call need a mutex?
Does this model need a mutex?
CC BY-SA 3.0
0
2011-05-04T14:49:26.410
2011-05-04T20:43:57.920
2011-05-04T14:59:13.410
262,660
262,660
[ "c++", "pthreads", "mutex", "race-condition", "stdvector" ]
5,885,872
1
null
null
1
1,347
I am trying to access the XML-RPC of my local drupal installation, from javascript. Here is the code: ``` $.ajax({ type: "POST", url: "http://www.sms2.com/services/xmlrpc", dataType: "xml", data: {"method": "node.get", "nid": 1 }, success: function(msg) { //alert("data: " + msg.type ); console.log("amrit"); } }); ``` My drupal index file is in /home/dark/web_root/sms2/index.php and HTML file is in /home/dark/web_root/sms2/test.html 'sms2' is set from /etc/hosts file. This is the response I am getting: ![enter image description here](https://i.stack.imgur.com/CYvOr.png) can anyone tell me what going on? I tried almost all the possible options but of no use.. POST tab: ![enter image description here](https://i.stack.imgur.com/UMxKP.png) Its working fine from the XML-RPC admin screen! ![enter image description here](https://i.stack.imgur.com/gldAN.png) Thanks
Drupal services XML-RPC access from javascript
CC BY-SA 3.0
null
2011-05-04T15:26:28.250
2011-05-05T10:27:12.117
2011-05-04T16:05:27.630
331,655
331,655
[ "php", "jquery", "web-services", "drupal", "xml-rpc" ]
5,886,423
1
5,893,162
null
0
573
I have a CALayer with a CATextLayer sublayer. When I apply a transform or otherwise resize the CALayer, I need the CATextLayer to resize within its parent's bounds. Upon resize, the CATextLayer also needs to truncate its characters without distorting the proportion of the characters. This effect can be seen in Garageband for iPad when you resize a clip in the sequence view (screen below). ![Garageband screen](https://i.stack.imgur.com/GlO1G.png) In my attempt to resize the CATextLayer within it's parent layer's bounds, I have: - - - Here's what happens: - -
Animate truncation of CATextLayer
CC BY-SA 3.0
null
2011-05-04T16:06:22.477
2011-05-05T05:44:14.180
null
null
384,109
[ "iphone", "objective-c", "ios", "core-animation", "calayer" ]
5,886,464
1
5,886,887
null
1
472
Within my main VS solution I have the following 3 projects: ![enter image description here](https://i.stack.imgur.com/3dA5z.png) The host hosts the WCFService in a console app (will be changed to a Windows Service after debugging). The host solution also has an App.config which sets up the NetPipe Binding for IDCCContract, and MEX NetPipe Binding for IMetaDataExchange configurations. I would like the host to start the DCC Service as soon as it runs, and then clients can use the WCF contract to access data from that instance of DCC Service. Currently, a new instance of DCC Service is created with ever Client that runs, which is what I do not want. How can I have once instance of my DCC Service that is created when the Host begins, and clients can connect and read data from that instance using the WCF contract?
Beginner WCF implementation question
CC BY-SA 3.0
null
2011-05-04T16:09:16.497
2011-05-17T18:10:26.967
2011-05-05T20:17:48.077
723,980
723,980
[ "c#", "wcf" ]
5,886,615
1
5,886,864
null
35
16,366
I need to get the dimensions of the display rectangle that the application can use on the device. For that I tried using: ``` Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); ``` My problem is that it gives me the height of the whole display and the display has a "status / notification" bar on top that the application can't use. I need the acual dimension that the application can use. To help you understand the question better I'll leave an image: ![enter image description here](https://i.stack.imgur.com/V7eks.jpg)
Display metrics minus status bar?
CC BY-SA 3.0
0
2011-05-04T16:22:27.803
2019-06-11T11:52:40.423
2011-05-04T16:24:40.443
424,509
652,392
[ "android" ]
5,886,687
1
5,886,855
null
1
252
I have two columns named FirstName and LastName. I want to query these from the table and display them in the format "FirstName LastName" (Note there is a space between FirstName and LastName) under the same column. I tried this ![enter image description here](https://i.stack.imgur.com/rlPCs.png) and the result comes like this ![enter image description here](https://i.stack.imgur.com/QkkRG.png) Why am I getting 0's ?
How to display query result in a particular format
CC BY-SA 3.0
0
2011-05-04T16:29:11.897
2011-05-04T16:44:04.680
2011-05-04T16:44:04.680
722,000
722,000
[ "sql", "sqlite" ]
5,886,771
1
5,887,109
null
0
944
In my android app I have a login screen. A graphic designer has given me this template ![enter image description here](https://i.stack.imgur.com/ZZswI.png) The closest I was able to get was this ![enter image description here](https://i.stack.imgur.com/YpBMK.png) I used a 9.png (temporarily the same as i use for my buttons) Any ideas how to pull this off with a combinations of layouts and 9.png files ? I don't want to use a static background image because we want to support all screen sizes... EDIT : I ended up using two different nine-patch files as the login part also needed to be extendable (the string in the button can vary in length according to phone locale). To put them together i used a relativelayout. I am pretty close to what I wanted to do : ![enter image description here](https://i.stack.imgur.com/HhMVs.png) for those interested, here the layout i used (i think i could be simplified) : ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="15dp" android:paddingRight="15dp" android:background="#ffffffff" android:gravity="center" android:orientation="vertical"> <LinearLayout android:id="@+id/login_field_container_top" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5dp" android:layout_centerInParent="true" android:layout_marginTop="0dp" android:layout_marginBottom="-5dp" android:background="@drawable/login_field_container_top"> <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="@string/email" /> <EditText android:id="@+id/email" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="none" android:inputType="textEmailAddress" android:singleLine="true" android:maxLength="255" /> <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="@string/password" android:layout_margin="5dp" /> <EditText android:id="@+id/password" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="none" android:password="true" android:singleLine="true" /> </LinearLayout> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right"> <LinearLayout android:id="@+id/login_field_container_bottom" android:layout_alignParentRight="true" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:background="@drawable/login_field_container_bottom"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="1dp" android:layout_margin="1dp" android:layout_gravity="center" android:gravity="center" android:background="@drawable/small_button_holder"> <Button android:id="@+id/login_button" android:text="@string/login" android:layout_margin="0dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingBottom="10dp" android:layout_toLeftOf="@id/login_field_container_bottom" android:layout_alignBottom="@id/login_field_container_bottom"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/notamember" style="@style/Subtitle" /> <Button android:id="@+id/register" android:text="@string/register" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> </RelativeLayout> </LinearLayout> ``` The only part I am not happy about is I had to add padding to align the left and right button
how to accomplish this layout in android
CC BY-SA 3.0
0
2011-05-04T16:36:39.293
2011-05-06T21:30:45.880
2011-05-06T21:30:45.880
271,395
271,395
[ "android" ]
5,886,894
1
5,887,208
null
2
671
So, when I double click a file in windows explorer, Intellij fires up, but instead of just showing me the file I want to see, shows up the following message: ![enter image description here](https://i.stack.imgur.com/vZE4l.png) I think I get what it means: it means this given .java file isn't associated with an Intellij project. That's actually true, but even so I'd like to be able to open the file and see it with syntax highlighting and such. How to overcome this problem? Thanks
When trying to open a .java file from windows explorer I get a "No project found to open file in" error message
CC BY-SA 3.0
null
2011-05-04T16:45:42.720
2011-05-04T17:09:32.050
null
null
130,758
[ "java", "ide", "intellij-idea" ]
5,886,912
1
null
null
2
3,747
How to create hyperlink in tooltip like in below image ![enter image description here](https://i.stack.imgur.com/k0AlN.gif)
Hyperlink in Tooltip
CC BY-SA 3.0
null
2011-05-04T16:47:16.990
2011-05-04T19:03:24.527
null
null
479,468
[ "c#", ".net", "winforms", "tooltip" ]
5,887,142
1
5,888,068
null
1
862
I am trying to send some HTTP POST parameters to some web server and one of parameters contains cyrillic characters. So the problem is that if I use this code: ``` wc.getPage(requestSettings); requestSettings.setHttpMethod(HttpMethod.POST); requestSettings.setRequestParameters(new ArrayList()); requestSettings.getRequestParameters().add(new NameValuePair("username", "Друже бобер")); wc.getPage(requestSettings); ``` Server will recieve the next urlencoded parameter: ![enter image description here](https://i.stack.imgur.com/kjaac.png) And this is wrong decoded string "Друже бобер". So I think that HtmlUnit encode url in core with using ASCII not Unicode. How to disable url encoding or how to fix this bug? If I'll encode this string and set to NameValuePair so all percent characters will be encoded by HtmlUnit to.
Java+HtmlUnit — problem with cyrillic urlencode
CC BY-SA 3.0
null
2011-05-04T17:04:13.807
2011-05-04T18:20:35.430
null
null
393,186
[ "java", "utf-8", "ascii", "htmlunit" ]
5,887,237
1
null
null
2
2,661
I have an iPad app playing http video streaming using variant playlist, which have multi streams with different bit rate for different bandwidths. One of then is audio only stream for lowest bandwidth. The app use to play the video. For some reason, I can't use MPMoviePlayerViewController. The problem I have is that when the video player play the video display black screen, the audio still playing. Which I think is awful to users, they don't know what going on. I want to display a still image in place of the video player. like this ![Standard iPad Video Player - Playing Audio Stream only](https://i.stack.imgur.com/z8Nfl.png) Is there any way I can detect when the player switch to different stream? Or detect if the stream is audio-only?
iPhone HTTP video streaming: How to show still image when playing audio-only stream
CC BY-SA 3.0
0
2011-05-04T17:12:04.227
2015-02-10T09:57:46.310
null
null
135,775
[ "iphone", "ipad", "video-streaming", "avplayer", "http-streaming" ]
5,887,605
1
5,887,910
null
0
188
i want to show a UI as like the following image![enter image description here](https://i.stack.imgur.com/H0bpR.png) how to show the horizontal and vertical lines between those numbers
how to design this UI in android
CC BY-SA 3.0
null
2011-05-04T17:45:35.317
2011-05-04T18:23:16.973
null
null
596,364
[ "android", "user-interface" ]
5,888,023
1
5,888,336
null
1
3,016
Today is my first day writing Excel macro and I was given a task to modify someone else's' code to add new features. I learn Excel has a Immediate window which I am finding very useful. I do have a question that I am unable to find the answer to in the last hour of searching. If you look at the image below you will notice that `fstr` is a string variable. ![Image](https://i.imgur.com/r2NFY.png) Currently, `fstr` holds a formula. How can I print out actual value of this formula instead of the formula itself? One thing I tried was `fstr.xlPastValues`, but it didn't work. I got this idea from recording a macro while pasting a value of a formula manually.
Excel Immediate Window Print Formula Value
CC BY-SA 3.0
0
2011-05-04T18:17:24.117
2012-07-24T15:22:15.283
2012-07-24T15:22:15.283
698,590
738,574
[ "vba", "excel", "excel-formula" ]
5,888,053
1
5,888,086
null
0
60
I have the following class: ``` @interface TTFacebookPost : NSObject { NSDate* _created; NSNumber* _postId; } @property (nonatomic, retain) NSDate* created; @property (nonatomic, retain) NSNumber* postId; @end ``` And when I try to access the postId in another class it always retrieves a memory address or a number that i do not know where it comes: ``` TTFacebookPost *post = cell.userInfo; NSLog(@"Post url is: %i", post.postId); ``` and the result is: ``` Post url is: 118538496 ``` this number is not saved anywhere in the object, so I do not know where is coming. This is how looks the object in memory: ![enter image description here](https://i.stack.imgur.com/nYV7y.png) thanks!
How to access to an object value (it always prints memory address)
CC BY-SA 3.0
null
2011-05-04T18:19:35.697
2011-05-05T12:29:46.833
2011-05-05T12:29:46.833
596,219
638,275
[ "iphone", "ios4", "nsobject" ]
5,888,265
1
5,888,381
null
4
4,381
Is it possible to remove UINavigationItem's border? My view under black nav. bar is black and i don't want no visual border between them. To make it clearer (image is not from my app): ![enter image description here](https://i.stack.imgur.com/n6y11.jpg)
How to remove UINavigatonItem's border line
CC BY-SA 3.0
0
2011-05-04T18:35:40.650
2013-12-03T16:14:09.367
null
null
324,417
[ "iphone", "border", "uinavigationitem" ]
5,888,864
1
5,888,895
null
17
16,493
If I have en extension like that : ``` public static string ImageLink(this HtmlHelper htmlHelper, string imgSrc, string alt, string actionName, string controllerName, object routeValues, object htmlAttributes, object imgHtmlAttributes) { return @"<img src=""../../Content/images/english.png"" /> "; } ``` and I use it in a partial view like this : ``` @Html.ImageLink("../../Content/images/english.png","English", "ChangeCulture", "Account", new { lang = "en", returnUrl = this.Request.RawUrl }, null,null) ``` I have an output like this : ![enter image description here](https://i.stack.imgur.com/z5113.png) Any idea why?
MVC Html Extension return string instead of html markup?
CC BY-SA 3.0
0
2011-05-04T19:31:37.253
2011-05-04T19:44:32.257
2011-05-04T19:38:46.017
29,407
13,913
[ "c#", "asp.net", "asp.net-mvc-3", "razor" ]
5,888,890
1
5,888,930
null
2
5,517
I keep trying to chang the UIManager to make these stupid looking green squares go away. how do i change the look and feel of this to the user? Is it system dependent? Someone else who was compiling my code had a constant gradient. Ideally, it would just be a solid square, as opposed to smaller blocks. Thanks ![enter image description here](https://i.stack.imgur.com/oqrvj.jpg)
Changing Swing progress bar look and feel
CC BY-SA 3.0
null
2011-05-04T19:34:12.667
2013-04-20T09:19:11.183
2013-04-20T09:19:11.183
714,968
541,070
[ "java", "swing", "look-and-feel", "jprogressbar" ]
5,888,981
1
5,889,141
null
2
1,036
I like the new New Project templates included in the ASP.NET MVC3 tools update, as presented at MIX 11 recently. A basic site can be seen here: [http://mix11.haacked.com/](http://mix11.haacked.com/) When I view the above site in Chrome, the HTML5 styles are visible - rounded corners and text shadow. ![chrome](https://i.stack.imgur.com/p4Unm.png) When I view the site in IE8 those styles aren't visible. ![ie8](https://i.stack.imgur.com/lsCt4.png) My question is, isn't Modernizr supposed to make these styles work in older browsers? -Matt
ASP.NET MVC 3 new project template - modernizr not working with IE8?
CC BY-SA 3.0
null
2011-05-04T19:41:51.740
2011-09-27T14:35:06.353
null
null
32,598
[ "asp.net-mvc-3", "modernizr" ]
5,889,145
1
5,889,193
null
0
617
I am working on a application which involves line scaling. I am working in Java/GWT so if there is already something inbuilt it would be great. I know this is very basic maths but I can't get my head around it (not its not homework before you ask). I know it can be done with Trig, but this is a piece of code that will be run 1000s of times so it needs to be basic operations if possible (- + / *) Essentially the orange line scales up and produces the blue line. I have: - - - I need: - ![](https://i.stack.imgur.com/QRNa6.png)
Line scaling - how to get the new coordinates?
CC BY-SA 3.0
null
2011-05-04T19:56:34.590
2011-05-04T20:01:27.933
null
null
126,280
[ "graph", "line", "coordinates" ]
5,889,252
1
null
null
2
490
How can I get data from gmail's last account activity page: [img](https://i.stack.imgur.com/O73Yz.png)![http://i.stack.imgur.com/O73Yz.png](https://i.stack.imgur.com/PGrXB.png) This information is available under address: [https://mail.google.com/mail/?ui=2&ik=SOME_ACCOUNT_ID&view=ac](https://mail.google.com/mail/?ui=2&ik=SOME_ACCOUNT_ID&view=ac) The problem is I don't know how to authenticate to access this page. I suppose I should use OAuth protocol somehow, but don't know details. I would like to use C# Does anyone have some tips ?
Gmail's Last activity
CC BY-SA 3.0
0
2011-05-04T20:09:20.243
2014-12-16T22:55:41.780
2011-05-04T21:03:15.617
420,453
420,453
[ "c#", "oauth", "gmail" ]
5,889,409
1
5,890,431
null
0
232
I am trying to create a view that looks like the following: ![enter image description here](https://i.stack.imgur.com/MoO5K.jpg) I know it's a UISplitView, however my issue is that on creating the UIToolBar that is below the UITableView to the left and also on how to create the icons on top of the detail view (the one with the trash can logo, reply, and new message). How do I do this?
creating apple ipad mail view
CC BY-SA 3.0
null
2011-05-04T20:24:16.650
2011-05-04T22:06:47.363
null
null
721,937
[ "iphone", "objective-c", "ipad" ]
5,889,800
1
5,912,856
null
2
1,083
Examples of what i'm going to need: ![enter image description here](https://i.stack.imgur.com/m2upc.jpg) ![enter image description here](https://i.stack.imgur.com/pu1f6.jpg) I'm using cocos2d to draw a CCTMXTiledMap, on those tiles i'll have to draw the LOS triangle. How would i test if the player is within that triangle, taking obstacles into account? How would i draw the line of sight area like in the examples above? BTW, i wasn't sure if this should have been posted here or on gamedev, don't be mad.
top down game - checking, drawing enemy's line of sight area with obstacles
CC BY-SA 3.0
null
2011-05-04T21:00:17.143
2011-12-24T15:20:09.463
2011-12-24T15:20:09.463
203,673
607,961
[ "objective-c", "algorithm", "math", "graphics" ]
5,890,114
1
5,890,248
null
1
2,039
I have a page where I CREATE and UPDATE an event and this event can have `eventDate` input calendar: When creating an event all works great. When I update an event I pre-populate this field with the date from DB: ``` txtEventDate.Text = Reader.GetDateTime(7).Date.ToShortDateString(); ``` Now, it shows nice: > 05/05/2011 but which worked for CREATING an event, now fails on UPDATING here: ``` cmd.Parameters.Add("?eventDate", MySqlDbType.DateTime).Value = DateTime.ParseExact(txtEventDate.Text + " " + txtEventTime.Text, "MM/dd/yyyy HH:mm", CultureInfo.InvariantCulture); ``` because it 'sees' (checked with Debug) that txtEventDate.Text has value: > 5/5/2011 So the 0's are missing... It's just really ugly...because in UI they are there...Do you know what can be the problem? : I've attached the photo to prove the issue...![enter image description here](https://i.stack.imgur.com/FMLn7.gif) Ps: (so I do not pre-populate this field but choose choose some date from calendar) all works perfectly...
Missing leading zeros/date issue in c#
CC BY-SA 3.0
null
2011-05-04T21:33:02.570
2011-05-04T21:47:57.187
2011-05-04T21:45:26.193
174,349
174,349
[ "c#", "asp.net", "datetime" ]
5,890,175
1
5,890,496
null
8
5,612
![](https://junk.orderofthehammer.com/title-entity-text-taken-literally.png) The above screengrab is from Firefox. The cursor is hovering over the yellow spot at the left hand side of the image. It is an `<img>` element (well actually it's an image together with an image map containing a single circular `<area>` element, but I assume this distinction is unimportant) that has been created and styled in JavaScript, including the application of a title attribute (constructed by cutting and gluing strings). How can I get this to behave and show the intended character, an en dash, instead of `&ndash;`? It works for innerHTML (the text "Barrow-In-Furness" in the top middle-left is a div that was also created using JavaScript, and its innerHTML set.) Edit: In response to question of Domenic: Here is the JavaScript function that builds and applies the title attribute (in addition to performing other jobs): ``` var StyleLinkMarker = function (LinkNumber, EltA, EltI) { var AltText = LocationName[LinkStart[LinkNumber]] + " to " + LocationName[LinkEnd[LinkNumber]]; if (!EltA) { EltA = document.getElementById("link_marker_area" + LinkNumber); EltI = document.getElementById("link_marker_img" + LinkNumber); } if (LinkStatus[LinkNumber] === 9) { var CanBuyLinkCode = BoardPreviewMode ? 0 : CanBuyLink(LinkNumber); if (CanBuyLinkCode === 0) { EltI.src = ImagePath + "icon-buylink-yes.png"; AltText += " (you can buy this " + LinkAltTextDescription + ")"; } else { EltI.src = ImagePath + "icon-buylink-no.png"; AltText += " (you cannot buy this " + LinkAltTextDescription; AltText += CanBuyLinkCode === 1 ? ", because you aren't connected to it)" : ", because you would have to buy coal from the Demand Track, and you can't afford to do that)"; } } else if ( LinkStatus[LinkNumber] === 8 || (LinkStatus[LinkNumber] >= 0 && LinkStatus[LinkNumber] <= 4) ) { EltI.src = ImagePath + "i" + LinkStatus[LinkNumber] + ".png"; if (LinkStatus[LinkNumber] === 8) { AltText += " (orphan " + LinkAltTextDescription + ")"; } else { AltText += " (" + LinkAltTextDescription + " owned by " + PersonReference(LinkStatus[LinkNumber]) + ")"; } } else { throw "Unexpected Link Status"; } EltA.alt = AltText; EltA.title = AltText; }; ``` `LocationName` is as follows: ``` var LocationName = [ "Barrow&ndash;In&ndash;Furness", "Birkenhead", "Blackburn", "Blackpool", "Bolton", "Burnley", "Bury", "Colne", "Ellesmere Port", "Fleetwood", "Lancaster", "Liverpool", "Macclesfield", "Manchester", "The Midlands", "Northwich", "Oldham", "Preston", "Rochdale", "Scotland", "Southport", "Stockport", "Warrington &amp; Runcorn", "Wigan", "Yorkshire" ]; ```
Is it not possible to use HTML entities in a title attribute?
CC BY-SA 3.0
0
2011-05-04T21:39:54.327
2013-04-03T00:18:06.717
2017-02-08T14:32:07.227
-1
340,819
[ "javascript", "html", "html-entities" ]
5,890,499
1
5,891,128
null
37
18,638
I am starting out with audio recording using my Android smartphone. I successfully saved voice recordings to a PCM file. When I parse the data and print out the signed, 16-bit values, I can create a graph like the one below. 1. What exactly are the units for the amplitude values? The values are signed 16-bit, so they must range from -32K to +32K. But what do these values represent? Decibels? 2. If I use 8-bit values, then the values must range from -128 to +128. How would that get mapped to the volume/"loudness" of the 16-bit values? Would you just use a 16-to-1 quantisation mapping? 3. Why are there negative values? I would think that complete silence would result in values of 0. If someone can point me to a website with information on what's being recorded, I would appreciate it. I found [webpages](https://ccrma.stanford.edu/courses/422/projects/WaveFormat/) on the PCM file format, but not what the data values are. ![enter image description here](https://i.stack.imgur.com/W6SL8.png)
PCM audio amplitude values?
CC BY-SA 3.0
0
2011-05-04T22:14:55.400
2014-04-11T14:01:09.613
2011-05-05T01:50:00.650
4,561,314
4,561,314
[ "iphone", "android", "audio", "audio-recording", "pcm" ]
5,890,588
1
null
null
0
391
Hope this isn't a lame question but for the life of me I cannot figure out how to make a pop-up button menu like the image I've attached from my phone. Any help is appreciated! ![http://i.stack.imgur.com/pMbRg.png](https://i.stack.imgur.com/lj9RK.png)
how do I create a popup menu like when you push the bookmark icon in safari.. SEE PIC
CC BY-SA 3.0
null
2011-05-04T22:28:04.927
2012-03-05T00:40:49.953
2012-03-05T00:40:49.953
689,356
738,901
[ "iphone" ]
5,890,919
1
6,140,115
null
7
1,466
The "Add Controller" dialog on an MVC project provides a dropdown list of model classes to choose from. These are usually the model classes in the project, and that's what I used to see. But now I'm getting this: ![Add Controller dialog in Visual Studio](https://i.stack.imgur.com/IVT45.png) Any idea what's wrong and how to change it back to what I believe is the normal way?
Visual Studio "Add Controller" list of model classes
CC BY-SA 3.0
0
2011-05-04T23:10:55.587
2012-06-17T14:21:35.993
2012-06-17T14:21:35.993
727,208
2,841
[ "asp.net-mvc", "visual-studio-2010", "visual-studio", "controller" ]
5,891,217
1
null
null
2
2,896
I'm looking for an effect like [Prezi](http://prezi.com/), but in Java. I'm using a `Canvas` object in a `JPanel`, and until now I just have a `MouseMotionListener` for moving objects. Do you have any idea to do this? this is prezi and its canvas: ![enter image description here](https://i.stack.imgur.com/Q8vRx.png)
How to move free in canvas?
CC BY-SA 3.0
0
2011-05-05T00:00:40.197
2011-05-05T17:08:40.187
2011-05-05T17:08:12.217
21,234
738,968
[ "java", "graphics", "canvas", "drawing", "graphics2d" ]
5,891,236
1
5,891,316
null
2
613
When a function list is targeted by a ReplaceAll, the PlotStyle for each function is lost. Example with default attributes: ``` GraphicsGrid[{{ Plot[{Sin@Cos@t, Cos@Sin@t}, {t, 0, Pi}], Plot[{s@c@t, c@s@t} /. {s -> Sin, c -> Cos}, {t, 0, Pi}] }}] ``` ![enter image description here](https://i.stack.imgur.com/wKqQ6.png) Example with custom attributes: ``` GraphicsGrid[{{ Plot[{Sin@Cos@t, Cos@Sin@t}, {t, 0, Pi}, PlotStyle -> {Dashed, {Red, Dotted}}], Plot[{s@c@t, c@s@t} /. {s -> Sin, c -> Cos}, {t, 0, Pi}, PlotStyle -> {Dashed, {Red, Dotted}}] }}] ``` ![enter image description here](https://i.stack.imgur.com/pU0hi.png) That is because of the way Plot explore its arguments before actually plotting. What is the most elegant way to specify individual PlotStyle attributes for the functions, and if possible, regain the default attributes when PlotStyle is not specified? Note: Of course doing ``` Plot[{f1 /. replist, f2 /. replist ....} ..] ``` is not considered "elegant" :D
Using ReplaceAll when plotting a functions list
CC BY-SA 3.0
null
2011-05-05T00:03:55.357
2011-08-24T04:14:09.497
2011-08-24T04:14:09.497
353,410
353,410
[ "wolfram-mathematica" ]
5,891,312
1
5,891,769
null
4
5,710
I have Entity Relationship Model (ERD) where entities `IndividualCategory` and `TeamCategory` relate to entity `Category`. Now I want to create tables in Oracle DB. I started like this: ``` CREATE TABLE Category( category_id INT PRIMARY KEY, ... ); CREATE TABLE Individual_category( category_id INT CONSTRAINT fk_cat_indivcat REFERENCES Category(category_id), ..., CONSTRAINT pk_indivgamecat PRIMARY KEY (category_id) ); CREATE TABLE Team_category( category_id INT CONSTRAINT fk_cat_teamcat REFERENCES Category(category_id), ..., CONSTRAINT pk_teamcat PRIMARY KEY (category_id) ); ``` This combination of and constraints assures that for every `Individual_category` there will be corresponding record in `Category` "super" table (or "parent" table ?). And there will be only one `IndividualCategory` record for particular `Category` record. Same for `Team_category`. To enforce inheritance I need one more constraint: A constraint that assures that for every record in `Category` there will be either record in `IndividualCategory` (X)OR a record in `TeamCategory` but not both. How do I create such constraint ? --- This is what I meant by 'inheritance in E-R model'. This is from my DB teacher's slides (they call it "Entity sub-type" there but they sometimes call it just inheritance):![enter image description here](https://i.stack.imgur.com/UqavU.png)
Foreign Key Constraints in Oracle
CC BY-SA 3.0
0
2011-05-05T00:17:45.983
2011-05-05T11:33:50.160
2011-05-05T01:40:03.007
311,865
311,865
[ "sql", "oracle", "database-design", "data-modeling", "foreign-key-relationship" ]
5,891,729
1
5,891,744
null
1
137
Thanks to the generous help of someone at stackoverflow, I was able to put different colored CSS boxes over different images and remove the css boxes (revealing the images) whenever there was a mouseover. this is the code i used fiddle [http://jsfiddle.net/alexdickson/fyYcC/](http://jsfiddle.net/alexdickson/fyYcC/) However, I also wanted the boxes to align horizontally in a float, so (being a beginner) I put another class (called float) around the images (in class rollover) but it deactivated the rollover. Is there a better way to implement the float than I have done below? Thanks for your help in advance ``` <div class="float"> <div class="rollover a"> <img src="http://blahblah.com/wp-content/uploads/2011/01/1.jpg" /> </div> </div> <div class="float"> <div class="rollover b"> <img src="http://blahblah.com/wp-content/uploads/2011/01/2.jpg" /> </div> </div> <div class="float"> <div class="rollover c"> <img src="http://blahblah.com/wp-content/uploads/2011/01/3.jpg" /> </div> </div> .float { float: left; width: 200px; border: 1px solid #fff; margin: 0 15px 15px 0; padding: 5px 10px 10px 10px; } ``` ![alignment problems](https://i.stack.imgur.com/GUluE.png)
my float class is deactivating my rollover class
CC BY-SA 3.0
null
2011-05-05T01:32:30.060
2011-05-05T01:56:35.617
2011-05-05T01:56:35.617
577,455
577,455
[ "javascript", "jquery", "html", "css" ]
5,891,819
1
5,891,880
null
6
1,530
I have a UITableView in an iPad application that I am working on. When I start in a portrait view and rotate to landscape, the view rotates and the rotation looks good. However, when I rotate from landscape to portrait, there is a white edge that is displayed during the rotation. It appears as though the UITableView is resized to fit the portrait display at the beginning of the rotation. (When rotating TO landscape, resizing first means that no white will be seen.) Through a few screenshots that I have been able to grab, it appears that the animation order is as follows: 1. Resize UITableView 2. Perform rotation animation 3. Resize UIToolbar While researching this, I found some people suggesting to change the UIWindow's background color to match your view (blue in this case), but my real UITableView does not have a solid color background, so this method is not sufficient. I would like to be able to control when the rotation of individual views occur so that I can prevent this white border from being visible during rotation. Or if there is a better approach, please share that too! [Edit] Here's a rough screenshot showing the white border during rotation: ![enter image description here](https://i.stack.imgur.com/x8hbF.png)
Unwanted white background visible around UITableView when rotating from landscape to portrait
CC BY-SA 3.0
0
2011-05-05T01:49:53.847
2014-07-15T09:43:00.660
2014-07-15T09:43:00.660
2,074,608
407,523
[ "iphone", "ipad", "animation", "uiview", "rotation" ]
5,892,104
1
null
null
12
1,638
In Linux, the load average is said to be on 1min/5min/15min. The formula used by the kernel is actually an Exponential moving average. If we define `cpuload(1)` as the first computation of the cpu load 1min, and `active()` as the function returning the number of process in state "running" or "runnable" on the system, then the formula used by the kernel to compute the cpu load 1min is: ![enter image description here](https://i.stack.imgur.com/CS4op.png) `cpuload(0)` is 0; it is the value stored in memory before the first execution of `cpuload()`. My question is, how was the weighting 2 chosen? In my opinion, 2 would have been better because 1min would have been the half-life of the number of process (because (2) = 1/2). --- Maybe it's helpful if i post the explicit formula of `cpuload(n)` in addition to the recursive definition above (right-click to see it in full size): ![enter image description here](https://i.stack.imgur.com/6i1bO.png)
How were the weightings in the linux load computation chosen?
CC BY-SA 2.5
0
2011-03-13T18:06:53.517
2011-08-31T04:55:11.343
null
null
368,507
[ "linux", "kernel", "history", "load", "algorithm" ]
5,892,276
1
5,893,809
null
2
4,603
How can I get an expandable [tree view] multiselect dropdown list? For example, from the below snapshot, if I have sub-list for Animals [Cat, Cow etc] is there any plugin as such that would show a + sign and when clicked, it would show the sub-list in the same dropdown like a tree view? ![enter image description here](https://i.stack.imgur.com/nURt2.jpg) Any advice?
Expandible Multiselect Dropdown list
CC BY-SA 3.0
null
2011-05-05T03:19:27.357
2011-05-05T06:57:56.703
null
null
265,650
[ "javascript", "jquery", "html", "jquery-plugins" ]
5,892,311
1
5,892,359
null
0
416
I am having a problem while a record is inserted into a table. ![enter image description here](https://i.stack.imgur.com/Ey7SP.png) each parking_cost is inserted after its related record. It should be with its record. why is this happening? Any ideas ? Regards.
SQL: insert records is not in order
CC BY-SA 3.0
null
2011-05-05T03:26:22.693
2011-05-05T03:42:56.650
null
null
624,420
[ "sql", "sql-server", "sql-server-2008" ]
5,892,442
1
5,892,471
null
1
264
I have a page with three radio buttons, as such: ![radio buttons](https://i.stack.imgur.com/aLHch.png) I want to make it so when one of these buttons is clicked, the font size of an element changes as such: ``` $("viewer").style.fontSize = "5pt"; ``` It's fairly straightforward to do this in Javascript with three separate functions. Something like the following should work, although I haven't tested it: ``` window.onload = function() { $("small").onclick = small; $("medium").onclick = medium; } function small(){ $("viewer").style.fontSize = "5pt"; } function medium(){ $("viewer").style.fontSize = "15pt"; } ``` Is there any way to merge these into one larger function?
Dealing with radio buttons in external Javascript
CC BY-SA 4.0
null
2011-05-05T03:44:44.870
2020-12-27T18:11:43.277
2020-12-27T18:11:43.277
4,370,109
685,562
[ "javascript", "event-handling", "radio-button", "jquery-events" ]
5,892,464
1
5,892,775
null
12
3,204
I have an NSView subclass which registers for drag files in init method like this: ``` [self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]]; ``` The drag drop works perfectly fine, but if I add a subview to this view with the exact same frame, it doesn't work any more. My guess is that the subview is block the drag event to go to super view. Can can I avoid that? Thanks Also, I know I am asking two questions, but I don't want to create a new topic just for this: When I am dragging, my cursor doesn't change to the "+" sign like with other drags, how can I do that? Thanks again. UPDATE: Here's the how I have it set up in my IB: ![enter image description here](https://i.stack.imgur.com/udoBs.png) The DrawView is the custom class I was talking about that registered for draggedtypes. And the Image view simply is a subview, I dragged an image from the media section... If it helps, here's my relevant code for DragView: ``` - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender { return NSDragOperationCopy; } - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender { NSPasteboard *pboard; pboard = [sender draggingPasteboard]; NSArray *list = [pboard propertyListForType:NSFilenamesPboardType]; if ([list count] == 1) { BOOL isDirectory = NO; NSString *fileName = [list objectAtIndex:0]; [[NSFileManager defaultManager] fileExistsAtPath:fileName isDirectory: &isDirectory]; if (isDirectory) { NSLog(@"AHH YEA"); } else { NSLog(@"NOO"); } } return YES; } ```
Cocoa NSView subview blocking drag/drop
CC BY-SA 3.0
0
2011-05-05T03:47:37.950
2020-10-14T18:43:13.377
2011-05-05T05:04:57.880
635,064
635,064
[ "objective-c", "cocoa", "macos", "drag-and-drop", "nsview" ]
5,892,539
1
5,923,089
null
2
782
Given is a 2D are with the polygons. I need to find out the polygons visible in a perpendicular line of sight from the a given line segment lying within that area. e.g. ![A sample example of the problem](https://i.stack.imgur.com/8ajfS.png) - Further,What can be the optimizations when the polygons have only vertical and horizontal edges.
Visibility of polygons from an edge
CC BY-SA 3.0
0
2011-05-05T04:01:47.143
2011-05-07T23:09:38.900
2020-06-20T09:12:55.060
-1
69,746
[ "visibility", "polygon", "computational-geometry" ]
5,892,551
1
5,892,839
null
6
2,039
I am running the Instruments Tool (Leaks) and am receiving memory leaks in the `QuartzCore` library and don't know exactly where in my code this is occurring. Usually I'm able to pin point the line where the leak is occurring, however the instrument tool isn't giving me anywhere to view this type of information. What would be some other things I could look at in terms of diagnosing such a leak? ![enter image description here](https://i.stack.imgur.com/O18ET.png) ![enter image description here](https://i.stack.imgur.com/yCkOQ.png)
iPhone/Objective-C - Memory leaks in QuartzCore library
CC BY-SA 3.0
0
2011-05-05T04:04:03.310
2011-05-05T05:22:02.050
2011-05-05T04:22:16.177
264,802
264,802
[ "iphone", "objective-c", "memory-management", "memory-leaks", "quartz-graphics" ]
5,892,904
1
5,892,958
null
1
535
I want to add a clickable image using a css class to an anchor tag in an asp mvc 2 application and leave the url section empty(since I have javascript code to load a pop up based on the id given to the anchor tag). Currently my code is : ``` <%= Html.ImageActionLink(null, null, "~/UI/Forms/Css/Images/get-reservation.png", null, new { @Id = "getReservation" }, new { @Class = "image" })%> ``` I added the Id, since I am using javascript to load a pop up when the getReservation id is clicked. The image class just adds padding. current css code : ``` .image { padding-left: 10px; } ``` What I want: To remove the path below from my ImageActionLink helper "~/UI/Forms/Css/Images/get-reservation.png" and define a css class: ``` .get-reservation { background: url('images/get-reservation.png') no-repeat center; height: 20px; width:20px; } ``` and do something like this: ``` <%= Html.ActionLink("#", null, new { @Class = "get-reservation image" }, new { @Id = "getReservation" })%> ``` But what I get in the browser is something like this :(And the image fails to appear.) ![enter image description here](https://i.stack.imgur.com/DXxyx.jpg) Expected outcome: ![enter image description here](https://i.stack.imgur.com/vaONf.jpg) Any help is appreciated. Thanks
How to add an image using css in asp mvc 2?
CC BY-SA 3.0
null
2011-05-05T05:07:10.610
2011-05-05T05:20:12.487
null
null
350,648
[ "javascript", "asp.net-mvc-2", "html.actionlink" ]
5,892,932
1
null
null
1
589
Ok, so after weeks of headache, I've given up and decided to turn to expert resource online! Basically, I am trying to get my iphone application to view in a forced landscape mode (to be precise, for a graph) for just 1 view controller in otherwise a portrait-orientation dominated navigation-bar application. I got everything working the way it should, EXCEPT when I put the application into background and return, the application returns with the navigation bar moved to where it usually sits in Portrait orientation mode but rotated 90', whilst every others like status bar, the main view are all still in landscape mode. I've tried to manually correct the navigation bar orientation afterwards, but cocoa seems to ignore this bit of code. It's almost as if the self.view.transform doesn't work when the application returns from background mode. Any suggestions? LandscapeViewController.m ``` - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return NO; } -(void)viewWillAppear:(BOOL)animated { self.view.transform = CGAffineTransformMakeRotation((M_PI * (90) / 180.0)); self.view.bounds = CGRectMake(0.0, 0.0, 480, 320); } ``` ![image](https://i.stack.imgur.com/AiDQX.png) [http://i.stack.imgur.com/Qx1Si.png](https://i.stack.imgur.com/Qx1Si.png)
iPhone navigation bar rotation issue when coming back from background
CC BY-SA 3.0
null
2011-05-05T05:10:04.713
2012-04-16T13:03:55.827
2011-12-22T13:13:17.490
53,195
739,211
[ "objective-c", "cocoa-touch", "ios4", "background", "orientation" ]
5,893,040
1
5,893,819
null
2
1,578
I have a WCF Service which returns an Object-I. The Object-I is an collection of List,String X,List. my WCF service runs without any error and returns it but when i call this in my silverlight application, i can't read this object-I. Please Help Me ``` //WCF Service Interface [ServiceContract] public interface IUserConfiguration { [OperationContract] userlistresponse GetUser(); } [DataContract] public class userlist { [DataMember] public string UserID { get; set; } [DataMember] public string UserName { get; set; } [DataMember] public string Password { get; set; } [DataMember] public string User_Type { get; set; } [DataMember] public string Salutation { get; set; } [DataMember] public string First_Name { get; set; } [DataMember] public string Middle_Name { get; set; } [DataMember] public string Last_Name { get; set; } [DataMember] public int User_Level { get; set; } [DataMember] public string Address { get; set; } [DataMember] public string City { get; set; } [DataMember] public string State { get; set; } [DataMember] public string Pincode { get; set; } [DataMember] public string Landmark { get; set; } [DataMember] public string Landline1 { get; set; } [DataMember] public string Landline2 { get; set; } [DataMember] public string Landline3 { get; set; } [DataMember] public string Mobile { get; set; } [DataMember] public string Email { get; set; } [DataMember] public string Status { get; set; } [DataMember] public string Token { get; set; } [DataMember] } [DataContract] public class ErrorManager { public string Error_ID { get; set; } public string Field { get; set; } } [DataContract] public class userlistresponse { public List<userlist> usersdetails { get; set; } public bool Flag { get; set; } public List<ErrorManager> Error { get; set; } } //WCF Service Implementation public userlistresponse GetUser() { userlistresponse ErrorUser = new userlistresponse(); try { DALUsersDetails DUD = new DALUsersDetails(); return DUD.GetUserDetails(); } catch (Exception Ex) { ErrorUser.Error.Add(new ErrorManager {Error_ID = "SUR0000",Field = Ex.Message.ToString()}); ErrorUser.Flag = false; } return ErrorUser; } //DATA ACCESS LAYER Just Returns a List From DataBase ``` Everything works fine here.and the WCF Service can be called in Silverlight application and can use the method. ``` //Silverlight Application public Searchuser() { InitializeComponent(); UserConfigurationClient UserClient = new UserConfigurationClient(); UserClient.GetUserCompleted += new EventHandler<GetUserCompletedEventArgs>(UserClient_GetUserCompleted); UserClient.GetUserAsync(); } void UserClient_GetUserCompleted(object sender, Proto.UserReference.GetUserCompletedEventArgs e) { if (e.Result != null) { Proto.UserReference.userlistresponse user = new userlistresponse(); user = e.Result;//Its Just Returns a string. if(user.flag == false) //Here is the Problem- The Object User[userlistresponse] does not shows or exposes the member inside that object. { .......................//some code } } } ``` ![User does not shows or exposes the member in userlistresponse object](https://i.stack.imgur.com/BFAg3.png)
How to return an Object in WCF Web Service?
CC BY-SA 3.0
null
2011-05-05T05:25:05.497
2011-05-05T07:00:56.527
2011-05-05T07:00:56.527
488,610
488,610
[ "silverlight", "wcf" ]
5,892,860
1
5,896,446
null
1
517
A kids has two robots that he controls remotely, both robots are on a NxN checkerboard and should be placed on the positions A and B in the checkerboard. Both robots are affected by the remote controller simultaneously, the same command affects both of their states. The remote controller can only make both robots turn clockwise or counterclockwise 90 degreees at a time or order both robots to move forward. The leftmost image shows the initial setting. The arrow pointing right is a robot facing east and the arraw pointing up is a robot facing north. Positions A and B are the robots destinies. Center image shows the result of moving both robots one step forward. Right image shows the result of making the robots rotate counterclockwise. ![Figure 1](https://i.stack.imgur.com/fe96M.png) The kid desires to calculate the minimum number of movements necessary to take the robots from their initial positions to their destinies. If a robot is commanded to run over a wall, it will remain on the same spot. Both robots will remain on their original spot if they're commanded to move to the same spot. Figure 2 shows this special cases. ![enter image description here](https://i.stack.imgur.com/jAE9L.png) Both robots should at arrive at a different destiny simultaneously. Input consists of various test cases, the first line starts with an integer with the size N of the inputMatrix (the checkerboard), with 2<= N <=25. The following N lines describe the checkerboard and have N characters each. A '.' indicates an empty position. N, E, S or O (Spanish for Oeste=West) indicates the original positiona and orientation of the robot. D indicates a destiny for the robot in the checkerboard and '*' indicates an obstacle. Input finishes with a case where N=0. input.txt ``` 5 D.... N...S ..... *...* ....D 5 ..... S..S. ..... ..... D..D. 3 SN. *** .DD 0 ``` correct output for input.txt: ``` 8 3 -1 ``` input2.txt: ``` 5 ..... ..D.S .D... ..... ..N.. 6 ...... ..S... ...... .ED... ...... .D.... 11 ....E...... ....D...... ........... ..S...D.... ........... ........... ........... ........... ........... ........... ........... 13 ............. ............. ............. ............. .....N....... ............. .........D... ..D.......... ............. ...E......... ............. ............. ............. 25 ...*.......*.*........... ........*..D...*.**....*. *..*.*.........*..*..*..D ...*.**.*........*...*... ......**..*..***.***...** .............*........... ....*...***.....*.**..... ......**.......**.*.*...* .........*..*...*.*...... ....**.*.*....**.*.*.*.*. .......*............**... ..........*.*.....*...... ...........**....*.**.... .....E.*.*..........**.*. .........*.*.*.*..*..*... *........**...*.......... ................***..*... ........*....*....*...*.. ......*...*.*...*.....**. ...*..........*.**....... .**............*.*..*.*.. ........*........*...*... *......*..........*...... *...*......N*......*..*.* . .....*..*.*..*...*...... 0 ``` "correct" (?) output for input2.txt: ``` -1 -1 9 -1 46 ``` My solution: ``` import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; class Position { int i; int j; char orientation; Position() { } void setIJ(int i, int j){ this.i=i; this.j=j; } void setOrientation(char c){ orientation = c; } public boolean equals(Object o){ if(o instanceof Position){ Position p = (Position)o; if((p.i==this.i)&&(p.j==this.j)&&(p.orientation==this.orientation)) { return true; } else return false; } return false; } } //end class Position class TransitionState { Position positionA; Position positionB; int counter; public boolean equals (Object o){ if (o instanceof TransitionState){ TransitionState transitionState= (TransitionState)o; if ((this.positionA.equals(transitionState.positionA)) &&(this.positionB.equals(transitionState.positionB))) { return true; } } return false; } } public class Robots { static Position moveForward(Position oldPosition, int matrixSize, char orientation, char [][] inputMatrix){ // add possible new Position Position newPosition= new Position(); //first return oldPosition in border positions in which the robot shouldn't move if ((orientation=='O')&&(oldPosition.j==0)) return oldPosition; if ((orientation=='E')&&(oldPosition.j==(matrixSize-1))) return oldPosition; if ((orientation=='N')&&(oldPosition.i==0)) return oldPosition; if ((orientation=='S')&&(oldPosition.i==(matrixSize-1))) return oldPosition; if ((orientation=='O')) newPosition.setIJ(oldPosition.i, oldPosition.j-1); if ((orientation=='E')) newPosition.setIJ(oldPosition.i, oldPosition.j+1); if ((orientation=='S')) newPosition.setIJ(oldPosition.i-1, oldPosition.j); if ((orientation=='N')) newPosition.setIJ(oldPosition.i+1, oldPosition.j); //return oldPosition for positions in which the robot is blocked by * if (inputMatrix[newPosition.i][newPosition.j]=='*'){ return oldPosition; } return newPosition; // if it got here, all ok } static char turnCounter (char orientation){ if(orientation=='N') return 'O'; if(orientation=='O') return 'S'; if (orientation=='S') return 'E'; else return 'N'; } static char turnClock(char orientation){ if(orientation=='N') return 'E'; if(orientation=='E') return 'S'; if (orientation=='S') return 'O'; else return 'N'; } static Position[] robotInitialPositions(char [][]inputMatrix){ Position [] helperArray = new Position[2]; int aux=0; for (int i=0; i<(inputMatrix[0].length); i++) for (int j=0; j<(inputMatrix[0].length); j++) { if((inputMatrix[i][j]=='N')||(inputMatrix[i][j]=='S')||(inputMatrix[i][j]=='O')||(inputMatrix[i][j]=='E')) { helperArray[aux]= new Position(); helperArray[aux].setIJ(i, j); if (inputMatrix[i][j]=='N'){helperArray[aux].orientation='N'; } if (inputMatrix[i][j]=='S'){helperArray[aux].orientation='S'; } if (inputMatrix[i][j]=='E'){helperArray[aux].orientation='E'; } if (inputMatrix[i][j]=='O'){helperArray[aux].orientation='O'; } aux= aux+1; } } return helperArray; } static Position[] getDestinies(char [][]inputMatrix){ Position [] helperArray = new Position[2]; int aux=0; for (int i=0; i<(inputMatrix[0].length); i++) for (int j=0; j<(inputMatrix[0].length); j++) { if((inputMatrix[i][j]=='D')) { helperArray[aux]= new Position(); helperArray[aux].i=i; helperArray[aux].j=j; helperArray[aux].orientation='D'; aux=aux+1; } } return helperArray; } static boolean [][]getUnvisitedMatrix(int matrixLength){ boolean[][] unvisitedMatrix = new boolean [matrixLength][matrixLength]; for (int i=0; i<matrixLength;i++) for (int j=0; j<matrixLength; j++) unvisitedMatrix[i][j]=false; return unvisitedMatrix; } static Position[]getNewRobotPositions (Position oldR1Pos,Position oldR2Pos, String movement, char [][]inputMatrix){ Position[]newPositions = new Position[2]; Position newR1Pos = new Position(); Position newR2Pos = new Position(); if(movement.equals("counter")){ if (oldR1Pos.orientation=='N'){ newR1Pos.orientation='O'; } if (oldR1Pos.orientation=='S'){ newR1Pos.orientation='E'; } if (oldR1Pos.orientation=='E'){ newR1Pos.orientation='N'; } if (oldR1Pos.orientation=='O'){ newR1Pos.orientation='S'; } if (oldR2Pos.orientation=='N'){ newR2Pos.orientation='O'; } if (oldR2Pos.orientation=='S'){ newR2Pos.orientation='E'; } if (oldR2Pos.orientation=='E'){ newR2Pos.orientation='N'; } if (oldR2Pos.orientation=='O'){ newR2Pos.orientation='S'; } newR1Pos.i=oldR1Pos.i; newR1Pos.j=oldR1Pos.j; newR2Pos.i=oldR2Pos.i; newR2Pos.j=oldR2Pos.j; newPositions[0]=newR1Pos; newPositions[1]=newR2Pos; // System.out.println("MOVED COUNTERCLOCKWISE"); // System.out.println("previous Robot 1 position was "+oldR1Pos.i + ","+oldR1Pos.j + " orientation was " + oldR1Pos.orientation + // " new Robot 1 position is " + newR1Pos.i + "," + newR1Pos.j+ " orientation is "+newR1Pos.orientation); // // System.out.println("previous Robot 2 position was "+oldR2Pos.i + ","+oldR2Pos.j + " orientation was " + oldR2Pos.orientation + // " new Robot 2 position is " + newR2Pos.i + "," + newR2Pos.j+ " orientation is "+newR2Pos.orientation); return newPositions; } if(movement.equals("clock")){ newR1Pos.i = oldR1Pos.i; newR1Pos.j = oldR1Pos.j; newR2Pos.i = oldR2Pos.i; newR2Pos.j = oldR2Pos.j; if (oldR1Pos.orientation=='N'){ newR1Pos.orientation= 'E'; } if (oldR1Pos.orientation=='S'){ newR1Pos.orientation= 'O'; } if (oldR1Pos.orientation=='E'){ newR1Pos.orientation= 'S'; } if (oldR1Pos.orientation=='O'){ newR1Pos.orientation= 'N'; } if (oldR2Pos.orientation=='N'){ newR2Pos.orientation= 'E'; } if (oldR2Pos.orientation=='S'){ newR2Pos.orientation= 'O'; } if (oldR2Pos.orientation=='E'){ newR2Pos.orientation= 'O'; } if (oldR2Pos.orientation=='O'){ newR2Pos.orientation= 'N'; } // System.out.println("MOVED CLOCKWISE"); // System.out.println("previous Robot 1 position was "+oldR1Pos.i + ","+oldR1Pos.j + " orientation was " + oldR1Pos.orientation + // " new Robot 1 position is " + newR1Pos.i + "," + newR1Pos.j+ " orientation is "+newR1Pos.orientation); / / // System.out.println("previous Robot 2 position was "+oldR2Pos.i + ","+oldR2Pos.j + " orientation was " + oldR2Pos.orientation + // " new Robot 2 position is " + newR2Pos.i + "," + newR2Pos.j+ " orientation is "+newR2Pos.orientation); newPositions[0]=newR1Pos; newPositions[1]=newR2Pos; return newPositions; } if(movement.equals("forward")){ //default case, if conditions not satisfied newR1Pos.i=oldR1Pos.i; newR1Pos.j=oldR1Pos.j; newR1Pos.orientation = oldR1Pos.orientation; newR2Pos.i=oldR2Pos.i; newR2Pos.j=oldR2Pos.j; newR2Pos.orientation = oldR2Pos.orientation; if(oldR1Pos.orientation=='N'){ if(oldR1Pos.i-1>=0){ //doesn't exceed the upper border //doesn't collide with '*' if (inputMatrix[oldR1Pos.i-1][oldR1Pos.j]!='*'){ newR1Pos.i=oldR1Pos.i-1; newR1Pos.j=oldR1Pos.j; newR1Pos.orientation = oldR1Pos.orientation; } } } if(oldR1Pos.orientation=='S'){ if(oldR1Pos.i+1<inputMatrix.length){ //doesn't exceed the lower border //doesn't collide with '*' if (inputMatrix[oldR1Pos.i+1][oldR1Pos.j]!='*'){ newR1Pos.i=oldR1Pos.i+1; newR1Pos.j=oldR1Pos.j; newR1Pos.orientation = oldR1Pos.orientation; } } } if(oldR1Pos.orientation=='E'){ if(oldR1Pos.j+1<inputMatrix.length){ //doesn't exceed the right border //doesn't collide with '*' if (inputMatrix[oldR1Pos.i][oldR1Pos.j+1]!='*'){ newR1Pos.i=oldR1Pos.i; newR1Pos.j=oldR1Pos.j+1; newR1Pos.orientation = oldR1Pos.orientation; } } } if(oldR1Pos.orientation=='O'){ if(oldR1Pos.j-1>=0){ //doesn't exceed the left border //doesn't collide with '*' if (inputMatrix[oldR1Pos.i][oldR1Pos.j-1]!='*'){ newR1Pos.i=oldR1Pos.i; newR1Pos.j=oldR1Pos.j-1; newR1Pos.orientation = oldR1Pos.orientation; } } } //same for robot 2 if(oldR2Pos.orientation=='N'){ if(oldR2Pos.i-1>=0){ //doesn't exceed the upper border //doesn't collide with '*' if (inputMatrix[oldR2Pos.i-1][oldR2Pos.j]!='*'){ newR2Pos.i=oldR2Pos.i-1; newR2Pos.j=oldR2Pos.j; newR2Pos.orientation=oldR2Pos.orientation; } } } if(oldR2Pos.orientation=='S'){ if(oldR2Pos.i+1<inputMatrix.length){ //doesn't exceed the lower border //doesn't collide with '*' if (inputMatrix[oldR2Pos.i+1][oldR2Pos.j]!='*'){ newR2Pos.i=oldR2Pos.i+1; newR2Pos.j=oldR2Pos.j; newR2Pos.orientation=oldR2Pos.orientation; } } } if(oldR2Pos.orientation=='E'){ if(oldR2Pos.j+1<inputMatrix.length){ //doesn't exceed the right border //doesn't collide with '*' if (inputMatrix[oldR2Pos.i][oldR2Pos.j+1]!='*'){ newR2Pos.i=oldR2Pos.i; newR2Pos.j=oldR2Pos.j+1; newR2Pos.orientation=oldR2Pos.orientation; } } } if(oldR2Pos.orientation=='O'){ if(oldR2Pos.j-1>=0){ //doesn't exceed the left border //doesn't collide with '*' if (inputMatrix[oldR2Pos.i][oldR2Pos.j-1]!='*'){ newR2Pos.i=oldR2Pos.i; newR2Pos.j=oldR2Pos.j-1; newR2Pos.orientation=oldR2Pos.orientation; } } } //if robots collide in new positions, revert to their original positions if ((newR1Pos.i==newR2Pos.i) && (newR1Pos.j==newR2Pos.j)){ //revert robot 1 position newR1Pos.i=oldR1Pos.i; newR1Pos.j=oldR1Pos.j; newR1Pos.orientation = oldR1Pos.orientation; //revert robot 2 position newR2Pos.i=oldR2Pos.i; newR2Pos.j=oldR2Pos.j; newR2Pos.orientation = oldR2Pos.orientation; } newPositions[0] = newR1Pos; newPositions[1] = newR2Pos; // System.out.println("MOVED FORWARD"); // System.out.println("previous Robot 1 position was "+oldR1Pos.i + ","+oldR1Pos.j + " orientation was " + oldR1Pos.orientation + // " new Robot 1 position is " + newR1Pos.i + "," + newR1Pos.j+ " orientation is "+newR1Pos.orientation); // // System.out.println("previous Robot 2 position was "+oldR2Pos.i + ","+oldR2Pos.j + " orientation was " + oldR2Pos.orientation + // " new Robot 2 position is " + newR2Pos.i + "," + newR2Pos.j+ " orientation is "+newR2Pos.orientation); } //end movement.equals("forward") return newPositions; } //1 procedure BFS(Graph,source): //2 create a queue Q //3 enqueue source onto Q //4 mark source //5 while Q is not empty: //6 dequeue an item from Q into v //7 for each edge e incident on v in Graph: //8 let w be the other end of e //9 if w is not marked: //10 mark w //11 enqueue w onto Q static void BFS (char [][] inputMatrix){ ArrayList<TransitionState> transitionStatesArray = new ArrayList<TransitionState>(); int moveCounter=0; //turns and forward movements add here int tempMoveCounterRobot1=0; int tempMoveCounterRobot2=0; int maxMoveCounter=0; PositionsAndCounter positionsAndCounter= new PositionsAndCounter(); Queue <PositionsAndCounter>queue = new LinkedList<PositionsAndCounter>(); Position robotInitial[] = robotInitialPositions(inputMatrix); //get source positionsAndCounter.positionPair=robotInitial; //used to encapsulate the positions with a counter to output positionsAndCounter.counter=0;//first initialize to 0 Position destinies[] = getDestinies(inputMatrix); //get destinies TransitionState firstTransitionState = new TransitionState(); firstTransitionState.positionA=robotInitial[0]; firstTransitionState.positionB=robotInitial[1]; transitionStatesArray.add(firstTransitionState); //mark transition used , if the transition is new, it should be queued queue.add(positionsAndCounter); String [] movement = {"forward", "counter", "clock"}; //possible movements inside inputMatrix outer: while (!queue.isEmpty()){ //while queue is not empty PositionsAndCounter v= queue.poll(); //dequeue an item from Q into V for(int k = 0; k<3; k++){ //for each edge e incident on v in Graph: Position[] newRobotPositions = getNewRobotPositions(v.positionPair[0], v.positionPair[1], movement[k], inputMatrix); TransitionState newTransitionState = new TransitionState(); newTransitionState.positionA=newRobotPositions[0]; newTransitionState.positionB=newRobotPositions[1]; if(!transitionStatesArray.contains(newTransitionState)){ //if the transition state is new add and enqueue new robot positions transitionStatesArray.add(newTransitionState); //if transition is new then queue PositionsAndCounter newPositionsAndCounter = new PositionsAndCounter(); newPositionsAndCounter.positionPair=newRobotPositions; newPositionsAndCounter.counter = v.counter +1; queue.add(newPositionsAndCounter); } inputMatrix[v.positionPair[0].i][v.positionPair[1].j]='.'; inputMatrix[v.positionPair[1].i][v.positionPair[1].j]='.'; //inputMatrix[v[0].i][v[0].j]='.'; // mark old position of robot 1 with . //inputMatrix[v[1].i][v[1].j]='.'; // mark old position of robot 2 with . //update new robot positions inputMatrix[newRobotPositions[0].i][newRobotPositions[0].j]= newRobotPositions[0].orientation; inputMatrix[newRobotPositions[1].i][newRobotPositions[1].j]= newRobotPositions[1].orientation; //check if solution has been found if ( ((destinies[0].i==newRobotPositions[0].i)&&(destinies[0].j==newRobotPositions[0].j) //robot in 0 arrived to destiny || (destinies[1].i==newRobotPositions[0].i)&&(destinies[1].j==newRobotPositions[0].j))// in 0 or 1 && //and ((destinies[0].i==newRobotPositions[1].i)&&(destinies[0].j==newRobotPositions[1].j) //robot in 1 arrived to destiny || (destinies[1].i==newRobotPositions[0].i)&&(destinies[1].j==newRobotPositions[0].j))//in 0 or 1 ) //end if { System.out.println("robots arrived at destinies"); System.out.println("robot 1, starting at " + robotInitial[0].i + "," + robotInitial[0].j + " is in " + newRobotPositions[0].i + ","+ newRobotPositions[0].j); System.out.println("robot 2, starting at " + robotInitial[1].i + "," + robotInitial[1].j + " is in " + newRobotPositions[1].i + ","+ newRobotPositions[1].j); System.out.println("movements: " + (v.counter)); return; //break outer; } } } System.out.println("robots can never arrive at their destinies"); System.out.println(-1); } static void printInputMatrix(char [][] inputMatrix){ for (int i=0; i<inputMatrix[0].length;i++) for(int j=0; j<inputMatrix[0].length;j++) { System.out.print(" "+inputMatrix[i][j]+" "); if(j==inputMatrix[0].length-1){System.out.println("");} } } public static void main(String[] args) throws IOException { // System.out.println("Test transition checker"); // Position p1 = new Position(); // p1.i=1; // p1.j=1; // p1.orientation='N'; // Position p2 = new Position(); // p2.i=1; // p2.j=2; // p2.orientation='N'; // Position p3 = new Position(); // p3.i=1; // p3.j=1; // p3.orientation='N'; // Position p4 = new Position(); // p4.i=1; // p4.j=1; // p4.orientation='N'; // // TransitionState transitionChecker1 = new TransitionState(); // transitionChecker1.positionA=p1; // transitionChecker1.positionB=p2; // // TransitionState transitionChecker2 = new TransitionState(); // transitionChecker2.positionA=p1; // transitionChecker2.positionB=p2; // // // ArrayList<TransitionState> arrayTransitions = new ArrayList<TransitionState>(); // arrayTransitions.add(transitionChecker1); // System.out.println("Test contains? " + arrayTransitions.contains(transitionChecker2)); BufferedReader br = new BufferedReader(new FileReader(new File("input.txt"))); char [][] inputMatrix; String line; char [] lineAsCharArray; int matrixSize; while(true){ line = br.readLine(); matrixSize=Integer.parseInt(line); inputMatrix = new char [matrixSize][matrixSize]; if (matrixSize==0){ // end outer looping break; } else { //begin inner looping for (int i=0; i<matrixSize; i++){ line = br.readLine(); inputMatrix[i] =line.toCharArray(); } //matrix loaded BFS(inputMatrix); } } } } class PositionsAndCounter { Position[] positionPair; int counter; PositionsAndCounter() { positionPair = new Position[2]; counter=0; } } ``` On the first input.txt file, it finds 9 movements to find the solution of the first course (when they should be 8) and 6 to find the solution of the second course (when it should be 3) though it correctly prints out -1 for the last (impossible) course configuration. On the second input.txt file, professor says it should print -1 and -1 for the to first courses, though my program finds a plaussible solution for the second case and a bizarre one for the first (this is where I think a more experienced debugger could help, I'm at a loss tracking the reason for the displaced destiny output on the first case). Are the outputs proposed by my professor right? My algorithm is also getting stuck on that case where 46 should be printed.
Debugging/fixing a BFS algorithm
CC BY-SA 3.0
null
2011-05-05T05:01:06.153
2011-11-01T15:33:20.237
2011-11-01T15:33:20.237
58,074
45,963
[ "java", "breadth-first-search" ]
5,893,164
1
null
null
0
1,332
I am using this code so that youtube video will display without webview ``` -(IBAction) trailor { //declaring path to file and stuff... NSString *urlAddress = self.Trailor;//@"http://www.youtube.com/watch?v=FZXcWK0tZjc&feature=related"; NSLog(@"url %@",urlAddress); NSURL *url = [NSURL URLWithString:urlAddress]; MPMoviePlayerViewController *playerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:url ]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:[playerViewController moviePlayer]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:[playerViewController moviePlayer]]; MPMoviePlayerController *player = [playerViewController moviePlayer]; [self.view addSubview:playerViewController.view]; player.controlStyle = MPMovieControlStyleDefault; player.shouldAutoplay = YES; [player setFullscreen:YES animated:YES]; } - (void)moviePlayBackDidFinish:(NSNotification*)notification { MPMoviePlayerViewController *moviePlayer = [notification object]; [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer]; [moviePlayer.view removeFromSuperview]; //[self.view setHidden:NO]; [moviePlayer release]; } ``` but there is no any reponse from this code, when I run this code thorugh a button.. it will ![enter image description here](https://i.stack.imgur.com/C6hlE.png) it will display me only this screen and nothing else. I want to open youtube link thorugh my app without using webview how can I do it any sample code? or tutorial you have then plz share it to me
open the youtube link thorugh my application without webview
CC BY-SA 3.0
null
2011-05-05T05:44:31.437
2011-06-22T02:25:23.540
2011-05-05T05:49:06.313
447,156
2,075,384
[ "iphone" ]
5,893,234
1
5,893,312
null
3
21,562
I'm having some issues with my page and header on the iPad vs desktop. When you look at [http://www.photopile.me](http://www.photopile.me) on the computer, the pictures and header/footer should stretch 100% of the way to the edge. ![enter image description here](https://i.stack.imgur.com/18F26.png) When you go to it on the iPad, it doesn't show the full width of the page and the 100% header gets resized. I'd like the ipad to show the full width of the page. ![enter image description here](https://i.stack.imgur.com/1whiM.jpg) I'm just getting started optimizing for iPad, but what am I missing? I'm sure there's a stupid little rule I'm missing. Here is the header HTML ``` <header> <div id="header-wrapper"> ... header content ... </div> </header> <div id="page-content"> .... photos .... </div> ``` and CSS ``` header { background: url('../images/header-bg.jpg') repeat-x top left; z-index: 500; -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, .9); -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .9); box-shadow: 0 5px 10px rgba(0, 0, 0, .9); position: fixed; top: 0; width: 100%; } #header-wrapper { padding: 10px; position: relative; } #page-content { margin: 0 auto; z-index: 400; position: relative; margin-top: 91px; overflow: hidden; } ``` Hope that's enough info!
iPad CSS Page Width
CC BY-SA 3.0
0
2011-05-05T05:53:11.397
2012-11-08T20:20:05.577
null
null
636,064
[ "ipad", "html", "css" ]
5,893,363
1
null
null
2
4,705
I have a problem with static google map with an improper image on my website. Anyone know how this issue occurs? Please see the image below: ![enter image description here](https://i.stack.imgur.com/aE5iw.png)
Google static map error
CC BY-SA 3.0
null
2011-05-05T06:10:36.880
2011-05-05T07:47:00.023
null
null
146,812
[ "google-maps", "google-maps-static-api" ]
5,893,699
1
null
null
2
1,899
I have a big problem with the language switcher, I have a multi language site that has every article in english and spanish , spanish being the default so if one article is named : domain.com/mi-articulo then the english one will be domain.com/en/my-article (using autopath is creating these aliases) now this works fine if I manualy change the url.. but if I use the language switcher ..the english corespondent it's switches without aliases and Lang prefix so instead of domain.com/en/my-article it finds domain.com/node/47 so as I have the menu and other things translated it makes drupal unaware of the language switched.. here are the screenshots to better understand what's happening (wierd behaviour) ver1. spanish ![all is in order, menus are ok, language is ok](https://i.stack.imgur.com/zbFAw.jpg) ver2. english ![with the url like it's suposed to be](https://i.stack.imgur.com/4TXfA.jpg) now if i click on english ..look what happends (see url and content like drupal is not aware that this content is nor spanish nor english...because the language switcher doesn't find the aliases) ![broken lang switcher content result](https://i.stack.imgur.com/tT9ZQ.jpg)
drupal language switcher unaware of the aliases? switches to node/XX/ instead of LANG/text
CC BY-SA 3.0
null
2011-05-05T06:45:51.983
2018-03-14T16:57:25.137
2018-03-14T16:57:25.137
225,647
249,071
[ "drupal", "translation", "multilingual", "language-switching", "drupal-path-aliases" ]
5,893,813
1
6,085,485
null
2
1,643
I am trying to develop a [FLUD](http://www.theflud.com/) style list of Panels by Sencha Touch. All the panels will be scrollable by themselves. Here are the images of what I want ![A panel like this](https://i.stack.imgur.com/rRwI9.jpg) inspired by a this FLUD panel : ![FLUD](https://i.stack.imgur.com/f7fY9.jpg) Now, if I just create a Ext.List of Ext.Panel (or may be a Tab Panel) with overflowed items, can they all be tapped and scrolled within themselves? Or can you provide some other idea to implement this?
Sencha Touch : FLUD style multiple scrolling panel
CC BY-SA 3.0
0
2011-05-05T06:58:19.953
2011-05-22T01:32:03.830
2011-05-05T07:03:52.717
417,311
417,311
[ "ipad", "sencha-touch", "extjs" ]
5,893,888
1
null
null
3
390
I'm running a merge with a scenario where several "common ancestors" are available so Git runs "git merge recursive" strategy. As such, it runs a merge to create a new ancestor that will, in turn, be used as CA for the contributors I'm working on. Ok, the problem is the following, there's a file with a conflict which "ancestor" comes from the "recursive merge" performed internally by Git, so, when I try to fix the conflict with git mergetool using KDiff3, I see the following:![enter image description here](https://i.stack.imgur.com/Jc7le.png) Is this normal? My example is a little bit "too simple" (only one line in the file, so not real), but... will having this common ancestor help? Thanks!!
git recursive strategy with multiple ancestors and kdiff3
CC BY-SA 3.0
0
2011-05-05T07:04:25.000
2013-03-16T18:06:48.570
null
null
72,456
[ "git", "git-merge", "kdiff3" ]
5,894,157
1
5,900,476
null
1
3,989
I need a little advice in manipulating DataGridView in Visual Basic .Net. This is my first time playing with DataGridView. My program is to load a .txt file containing data of every room in a building and display them in the DataGridView. Here is a portion of the file showing 2 rooms: ``` 1;1812;1812;F18;T1;26808.16;.00;.00;.00;.00;.00;.00; 1;1813;1813;F18;T1;24000.00;3500.00;.00;300.00;.00;.00;.00 ``` A room is a one-line string that ends with an endline character. I have no problem with loading the file and getting all these information. I store data of each room into an object of class Room, and put them in a list. Right now, I put all of the properties of the room into the data grid's columns like this: ![edit columns](https://i.stack.imgur.com/uqakf.jpg) Now, how can I put all these rooms' data into the grid? I tried follow [http://www.dotnetperls.com/datagridview-vbnet](http://www.dotnetperls.com/datagridview-vbnet) at first, but setting DataSource to a list of class Room imitating from the given link doesn't show anything in the grid view. How can we tell the program to link rows of the grid to a list of objects? Or am I doing it wrong? So any advise is appreciated. How do we do this?
Need some advice on putting data into DataGridView in vb.Net
CC BY-SA 3.0
null
2011-05-05T07:33:36.907
2013-02-04T08:13:29.520
2011-05-05T11:40:50.767
2,660
144,201
[ "vb.net", "datagridview", "datasource" ]
5,894,168
1
5,894,182
null
9
16,812
Currently, as [stated here](https://stackoverflow.com/questions/297298/how-to-change-the-default-browser-to-debug-in-visual-studio-2008/297306#297306), I have to `1)` find a web page file and `2)` right click to select `Browse with...` to open the dialog which lets me to configure the web browser to start with. Is it possible to open that dialog quickly from menu/hotkey/toolbar? Please share. Start with this![enter image description here](https://i.stack.imgur.com/RY2t2.png) Will open this ![enter image description here](https://i.stack.imgur.com/GYDRf.png)
How to change default web browser when debug/run a web site?
CC BY-SA 3.0
0
2011-05-05T07:34:25.440
2014-11-04T09:24:26.330
2017-05-23T12:24:35.900
-1
248,616
[ "visual-studio-2010", "browser", "default" ]
5,894,311
1
5,898,717
null
1
1,013
I am trying to build a DBPSK demodulator using Simulink and Xilinx blockset. I calculate the Phase Difference of the Successive samples like this : ![enter image description here](https://i.stack.imgur.com/nzhBw.jpg) So, now I need to map these Phase Difference to Symbol 0 or 1 depending on whether the Phase difference is 0 or pi. ``` % ---------------------------------------- % | Bit input | Phase change (+j*pi) | % ---------------------------------------- % | 0 | 0 | % ---------------------------------------- % | 1 | pi | % ---------------------------------------- ``` I am not sure how I can do Phase to Symbol mapping in Simulink(Xilinx). BTW, here is the Matlab version : ``` demod_symbol=abs(round(DBPSK_Signal/pi)); for i=1:length(demod_symbol) if(demod_symbol(i)==2) demod_symbol(i)=0; end end ``` Please let me know, if my approach is correct and how to proceed further
DBPSK Demodulation in Simulink using Xilinx blockset
CC BY-SA 3.0
null
2011-05-05T07:45:45.627
2011-05-05T13:44:12.027
null
null
276,859
[ "matlab", "signal-processing", "fpga", "simulink", "xilinx" ]
5,894,375
1
5,894,954
null
0
1,892
I would like to do a presentation like this : (done with `Gimp`) ![Good part is with 03 sept.](https://i.stack.imgur.com/fl4v9.png) And for the moment I only get something like this : ![Bad result](https://i.stack.imgur.com/PGXX3.png) My layout xml file is for the moment like this : ``` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/itemRoot" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="4sp" android:orientation="vertical"> <LinearLayout android:id="@+id/bigbox" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_marginTop="20px" android:background="#caced4" android:clipChildren="false" android:onClick="itemClicked"> <RelativeLayout android:id="@+id/box" android:layout_marginTop="-10px" android:layout_width="wrap_content" android:layout_height="wrap_content" > <TableLayout android:id="@+id/TableLayout01" android:layout_width="40dip" android:layout_height="40dip" android:background="@drawable/corner" > <TextView android:text="03 sept." android:background="#424e5f" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="3px" android:layout_marginBottom="3px" android:layout_marginRight="3px" android:layout_marginTop="3px" android:id="@+id/itemPubdate" android:gravity="center" android:textStyle="bold"/> </TableLayout> </RelativeLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:paddingLeft="4sp"> <TextView android:id="@+id/itemTitle" android:text="Arrêtez moi ces répondeurs d'email" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="2" android:textColor="#424e5f" android:textSize="13sp" android:textStyle="bold"/> <TextView android:id="@+id/itemDescription" android:text="Qui, suite à l'envoi d'un email, n'a pas reçu etc." android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#000000" android:maxLines="3" android:textSize="11sp"/> </LinearLayout> </LinearLayout> ``` I have tried many combinaisons with `android:clipChildren="false"` without any good result .. If someone have a solution for this ... that will help me so much. Thanks,
Can't get a good overlapping with RelativeLayout
CC BY-SA 3.0
0
2011-05-05T07:51:50.603
2015-09-18T12:03:45.593
2015-09-18T12:03:45.593
3,290,339
734,833
[ "android", "overlapping", "android-relativelayout" ]
5,894,642
1
5,909,579
null
16
2,977
In my website's drop down menu, an element's top, left and right borders are set to gray and bottom border is set to white. This works perfectly in FF3, Chrome to achieve a beautiful drop down menu with a continuous border. But, I see a white dot on the left hand side from FF4+ and in IE9+ I think the issue is, in FF3, the bottom left pixel was given the same color as the left border. But in FF4, the bottom left pixel is given the same color as the bottom border! This is looking ugly. How can I fix this so that, the entire left side of the drop down menu is one continuous gray line? What I am doing here is, the sub-menu has a full gray border. I want to remove the gray border between the "Projects" and the sub-menu itself so that it all appears as a single thing with continuous border with no divisions in between. So I made the "Projects" bottom border white and set it to overlap the sub-menu by 1px. So, part of the gray border of the sub-menu disappears and it appears continuous. But in FF4 and IE9, the bottom left and bottom right pixels respectively are screwing things up. Hover over the menu in [http://www.softinternals.com](http://www.softinternals.com) and you can see this on the left side border in FF4. # Here are screenshots of the drop-down menu: # Firefox 4: ![Firefox 4 Screenshot](https://i.stack.imgur.com/a7DrM.png) # Internet Explorer 9 ![IE9 Screenshot](https://i.stack.imgur.com/uBu4J.png) --- I did more research and found this: When applying a single pixel thick border, each browser and each version of the same browser seem to have a different idea about what color to choose for the corner pixels. # Firefox 3 This is what I want :) It suits my drop down menu well as the bottom left color is taken from the left border. - - - ![Firefox 3](https://i.stack.imgur.com/lliO5.png) # Firefox 4 This is not what I want :( - ![Firefox 4](https://i.stack.imgur.com/FC6rn.png) # Internet Explorer 8 Also not what I want. - ![IE8](https://i.stack.imgur.com/NR4UD.png) # Chrome 11 Somewhat close to what I want :) - ![Chrome](https://i.stack.imgur.com/EKMq9.png) # Internet Explorer 9
How to fix this white-dot border issue in a drop down menu?
CC BY-SA 3.0
0
2011-05-05T08:20:24.017
2011-05-06T10:09:05.123
2020-06-20T09:12:55.060
-1
null
[ "html", "css", "border" ]
5,894,746
1
5,907,754
null
1
2,906
![enter image description here](https://i.stack.imgur.com/ppTBz.png)I've created a world map in flash and I want to code an ActionScript so that if I click on a country the map, it should zoom into it and show some information beside the country. I dont know how to start it. A sample could be better. Please let me know if you know any good step by step turial site. Find the pic here for reference : [ASIA](https://i.stack.imgur.com/ppTBz.png) I have added the ASIA part which i have created. When i click on India, it should zoom into it.
Create a map in flash and zoom into it
CC BY-SA 3.0
0
2011-05-05T08:30:00.473
2011-05-06T06:43:49.540
2011-05-06T06:34:11.250
685,016
685,016
[ "flash", "actionscript-3", "actionscript", "flash-cs3" ]
5,894,876
1
5,896,506
null
0
262
I have to post a data from a page using jquery.load(). I put it on a page with spark viewengine. the post method fire where a button click, will execute a js function. ``` <script type="text/javascript"> function displayCheckedOrders() { var $checkedRecords = $(':checked'); if ($checkedRecords.length < 1) { alert('Check a few grid rows first.'); return; } var url = '${Url.Action("myaction","Account")}'; var temp = $('#xresult').load(url, $checkedRecords); } </script> ``` but, it didn't parse a correct url, ![enter image description here](https://i.stack.imgur.com/Am6RF.jpg) any solution for my problem ?
wrong URL parsed using jQuery Load()
CC BY-SA 3.0
null
2011-05-05T08:40:42.010
2015-09-30T03:43:50.883
2015-09-30T03:43:50.883
1,560,062
454,786
[ "jquery", "asp.net", "asp.net-mvc-3", "spark-view-engine" ]
5,894,853
1
null
null
3
901
Sorry to ask just a wide question, but I am having trouble thinking how to approach this problem. I have a many to many relationship: ``` Product 1 --- * ProductCategory * --- Category ``` Category also has: ``` Category 0..1 --- * Category (As SubCategories) ``` What I want to to see a tree view, with all categories, and be able to check a checkbox to create the ProductCategory entity. I do not how to approach this with MVVM. ![enter image description here](https://i.stack.imgur.com/qKtPg.png) In ASP.NET, when rendering the tree view I would check to see if the CategoryId of the node I was rendering was in my list of 'ProductCategory's if it was, I would check the box, and so setting up the initial state. Then I would attach event handlers to the nodes (along with maybe some data) so that when the checkbox was checked/unchecked, it would add/remove the appropriate entity from my list. The problem is I'm trying to move towards MVVM, and sometimes seeing how exactly it helps, and whilst some things a neater, doing anything complicated seems to be a pain! For example, my inital thought was to bind the top level Category (Root) to the tree, and render all entities using the HierarchicalDataTemplate: ``` <sdk:TreeView Margin="0,3,30,3" ItemsSource="{Binding Categories}" Height="300"> <sdk:TreeView.ItemTemplate> <sdk:HierarchicalDataTemplate ItemsSource="{Binding SubCategories}"> <StackPanel Orientation="Horizontal"> <CheckBox></CheckBox> <TextBlock Text="{Binding Name}" HorizontalAlignment="Left"></TextBlock> </StackPanel> </sdk:HierarchicalDataTemplate> <!----> </sdk:TreeView.ItemTemplate> ``` The problem is that I cannot bind my checkbox to anything, because Category has no field I can use to attach it to a product... Please can an MVVM guru throw some light on this, or should I simply go down the 'event' route? Many Thanks.
MVVM: Manage many to many relationship with treeview in (Silverlight)
CC BY-SA 3.0
null
2011-05-05T08:38:59.940
2011-05-05T16:11:56.250
null
null
282,090
[ "silverlight", "mvvm", "mvvm-light", "silverlight-toolkit" ]
5,894,907
1
5,896,425
null
0
223
I have to design a page for user information, for some background verification purpose, at my work. I need a set of fields for address, total count of which will be selected by user to update the form with that many fields. So, if user selects 3, form will have 3 set of address fields. Similar concept for work and education details. Right now, I am passing the count to a handler page, which checks total count, and return it along with querystring, back to the main page. I am able to update the no. of fields, this way, but, all values are lost, once I return to the form. There are a lot of fields to even use session object for every value. Also, it resets the count of other such field set to 0. So, if I select 4 in address field, it renders four set of address fields, but fields for other details are gone. I need to know, if it is possible to update the fields, using just one page, instead of creating a handler file to handle the redirect, so that I don't lose other data. Sorry, for sounding a bit confusing. Will update the question, if needed. Edit: ![This is the screenshot of the address block.](https://i.stack.imgur.com/4MPae.jpg) Similar blocks are there for education and work details. I want the update button to update the block, with that many fields, while retaining the values already entered by the user. I have finally shifted the update code to one page. And the total count of blocks, is calculated by this way. ``` if request.form("addresscount") <> "" then varaddresscount = request.form("addresscount") else varaddresscount = 1 end if ``` varaddresscount is used to loop through the html code which renders address fields. Even with this method, if I click on update button to change the total field count, every value entered by user is reset to default. Is there a way to retain the no. of fields without using session object, as there are way too many fields for which I have to store the value in session.
How to create a form with variable no. of field set
CC BY-SA 3.0
null
2011-05-05T08:43:45.153
2011-11-21T02:47:32.700
2011-11-21T02:47:32.700
3,043
616,813
[ "asp.net", "html" ]
5,894,958
1
5,911,510
null
17
28,914
Well i downloaded the newest version, then installed, checked to instal entire files on local drive. I restarted VS2010 and rerun it. Unfortunatelly i can't find in menu > tools anything with should be connected with stylecop ( as in tutorial "how to use stylecop"). I am using x64 Windows7. I really really don't know how to to use it. Look: I click inside code, white field and i see only this: ![enter image description here](https://i.stack.imgur.com/R6kmA.png)
how to properly install stylecop?
CC BY-SA 3.0
0
2011-05-05T08:48:55.890
2017-06-22T07:52:56.660
2017-06-22T07:52:56.660
619,673
619,673
[ "c#", "visual-studio-2010", "stylecop", "windows-7-x64" ]
5,894,967
1
null
null
0
418
I've use a imagepicker to select image from my photo library, then i display that image in an uiimageview. Landscape photo works fine but there is some weirdness to the portrait image. The portrait image suppose to fill up the left and right empty space but it's not. Cant figure out why the picture wont fill up the left and right space cause the imageview frame did specify the mainScreen bounds. If i take away the aspectfit then the potrait image is nicely display but the landscape image is stretched to fill up the whole imageview. My code is as follow: ``` CGRect frame = [[UIScreen mainScreen] bounds]; UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:frame]; UIImageView *selectedImageView = [[UIImageView alloc] initWithFrame:frame]; selectedImageView.image = image; selectedImageView.contentMode = UIViewContentModeScaleAspectFit; [scrollView addSubview:selectedImageView]; [selectedImageView release]; scrollView.delegate = self; [self.view addSubview:scrollView]; [scrollView release]; ``` Here is what it looks like: ![enter image description here](https://i.stack.imgur.com/6Kxbk.png) Edit: My goal is to display the photo like it's been display in Photos album, start out as fitting in the view and allow zoom in to a certain limit.
uiimageview aspectfit question
CC BY-SA 3.0
null
2011-05-05T08:49:42.170
2011-05-05T09:18:58.027
2011-05-05T09:18:58.027
366,289
366,289
[ "iphone", "uiimageview", "uiimagepickercontroller" ]
5,895,182
1
5,940,769
null
1
1,190
When you upload files in IE (at least in IE8) you can double click on the field instead of clicking browse. The problem if you do this is when you return to the form after selecting a file. It will look like this: ![enter image description here](https://i.stack.imgur.com/kP4nf.png) IE will select the text in the field no matter where you move your mouse on the page (It releases focus if you click anywhere though) This will not happen if you click the browse button to begin with, it only occurs when double clicking the input field. Now, is there a way to make the field behave the same way, whether you click the button or double click the field? Like setting focus on some other part of the form. It's starting to annoy me.
Upload files - IE won't release focus of input field
CC BY-SA 3.0
null
2011-05-05T09:08:14.313
2015-04-08T02:57:10.283
2011-05-09T17:25:12.787
536,610
536,610
[ ".net", "internet-explorer", "file-upload" ]
5,895,289
1
5,898,564
null
0
13,405
In my `ASPxGridView`, I getting total simply `IPOTEK` column in footer with this code; ``` <TotalSummary> <dx:ASPxSummaryItem FieldName="IPOTEK" SummaryType="SUM" ShowInGroupFooterColumn="IPOTEK" DisplayFormat="n0" /> </TotalSummary> ``` And i getting average value of `IPOTEK` column when i grouping in Group's footer. ``` <GroupSummary> <dx:ASPxSummaryItem FieldName="IPOTEK" SummaryType="AVERAGE" ShowInGroupFooterColumn="IPOTEK" DisplayFormat="n0" /> </GroupSummary> ``` Everything is OK. For example when i grouping with, it looks like this; (`IPOTEK` column is starting ) ![enter image description here](https://i.stack.imgur.com/xE5D0.png) What i want is; in `TotalSummary`, only total of `GroupSummary` values for `IPOTEK` column. Rigth now, for this data adding `TotalSummary` value `109.827` * `3` = `329.481` (GroupSummary * 3) What i want, for this data adding only and only `GropupSummary` value to `TotalSummary`. How can i do that? Best Regards, Soner
Total of GroupSummary to TotalSummary in DevExpress
CC BY-SA 3.0
null
2011-05-05T09:16:50.743
2011-05-05T15:28:23.900
2011-05-05T11:10:01.067
447,156
447,156
[ "c#", "asp.net", "devexpress", "aspxgridview", "subtotal" ]
5,895,430
1
null
null
2
2,721
Is there a way to read in excel (2003) files in .NET without office beeing installed and maybe even without any 3rd party library? To be able to use VSTO I suppose office needs to be installed, right? But how about ADO.NET (e.g. `Microsoft.Jet.OLEDB.4.0,Extended Properties=Excel 8.0`)? Does it require Office beeing installed? It is also important that I can read in these comments made to a cell: ![enter image description here](https://i.stack.imgur.com/jveYW.jpg)
reading excel files without office beeing installed
CC BY-SA 3.0
null
2011-05-05T09:27:20.310
2014-04-07T18:16:24.580
2014-04-07T18:16:24.580
881,229
4,227
[ ".net", "excel", "ado.net", "vsto", "ms-office" ]
5,895,472
1
6,012,544
null
1
2,086
I have an add-in for Outlook 2010, created with Visual Studio 2010 and using VSTO. The projects target framework is .NET framework 4 Client Profile (as default). Is there any way to change the target framework to .NET framework 3.5 or .NET framework 3.5 profile for my project? The project itself doesn't allow me to make the change and reverts back to .NET 4, when using the project Properties -> Application tab. ![enter image description here](https://i.stack.imgur.com/HrnMR.png) I am aware that I may need to make changes to my code, in order for it compile for .NET Framework 3.5. Best regards MLJ
It is possible to target .NET framework 3.5 or .NET framework 3.5 client profile when creating an Add-in for Outlook 2010
CC BY-SA 3.0
null
2011-05-05T09:30:39.100
2011-05-16T01:50:03.703
2011-05-05T11:36:02.367
704,787
704,787
[ ".net", "visual-studio-2010", "frameworks", "vsto", "outlook-addin" ]
5,895,804
1
null
null
2
229
I am using fpdf to generate pdf in php. I want following layout :![enter image description here](https://i.stack.imgur.com/GC8sM.jpg) Red area denotes logo while the black area denotes text. I have used header function to generate header that is logo and the text. What I am curious to know is that how can I make tabular layout like this, i.e border for header, overall border and in the bottom text with border? I am only able to make acknowledgment text with border.
How to make tabular layout in pdf?
CC BY-SA 3.0
null
2011-05-05T09:57:36.433
2013-04-25T18:46:50.547
2012-11-19T15:30:52.067
29,995
146,192
[ "php", "fpdf" ]
5,895,816
1
5,895,912
null
22
65,845
I am trying to set an integer value as such: ``` Dim intID as integer intID = x * 10000 ``` This works ok when `x` is 3 or less. But when `x` is 4, this gives me the error: > run-time error 6 Overflow I don't understand why this is. I can set `intID` to 40000 directly without any problems, so it's obviously capable of storing large numbers. ![enter image description here](https://i.stack.imgur.com/gND2M.png)
VB6 overflow error with large integers
CC BY-SA 3.0
0
2011-05-05T09:58:25.263
2023-01-17T11:09:52.747
2011-05-05T11:15:32.807
472,377
472,377
[ "vb6", "integer", "overflow" ]
5,896,193
1
5,896,232
null
1
746
This is currently what I have. ![http://i2.photobucket.com/albums/y2/Lokolo/linearLayout.png](https://i.stack.imgur.com/T0Uh0.png) All the boxes are linear layouts. But I want the Star to be right aligned. I have added a TextView with " " just to make a little space but I will be removing this. If I change the TextView to fill_parent it causes the Star to go off to the right of the screen (as expected but I was hoping it would fill up everything inbetween itself and the star) I can't think how to make the ImageView go to the right. The layout_grvaity is currently right but this hasn't changed anything. Not very good with design ;) TIA
Android LinearLayout Alignment Issue
CC BY-SA 3.0
null
2011-05-05T10:26:17.457
2011-11-28T06:39:21.153
2011-11-28T06:39:21.153
234,976
663,289
[ "android", "alignment", "android-linearlayout" ]
5,896,452
1
null
null
0
203
I am trying to use custom UITableViewCell. Everything is going well but the label I used in cell is not placing in proper place. I dragged labels as it is in custom cell from library. Cell referenced to the class in its attribute window. I have only created an empty nib. Should I create a class for cell to set its place ? Any help tutorial reference plz. Actually I am trying to create view like: ![enter image description here](https://i.stack.imgur.com/rPK9I.png)
creating custom TableViewCell , label positions are correct
CC BY-SA 3.0
null
2011-05-05T10:46:36.773
2011-05-06T06:29:55.527
2011-05-06T06:29:55.527
296,387
720,235
[ "iphone", "objective-c", "ios", "uitableview" ]
5,896,450
1
5,897,097
null
1
499
I have created a simple Chebyshev low pass filter based on coefficients generated by this site: [http://www-users.cs.york.ac.uk/~fisher/mkfilter/](http://www-users.cs.york.ac.uk/~fisher/mkfilter/), which I am using to filter out frequencies above 4kHz in an 16kHz sample rate audio signal before downsampling to 8kHz. Here's my code (which is C#, but this question is not C# specific, feel free to use other languages in different languages). ``` /// <summary> /// Chebyshev, lowpass, -0.5dB ripple, order 4, 16kHz sample rte, 4kHz cutoff /// </summary> class ChebyshevLpf4Pole { const int NZEROS = 4; const int NPOLES = 4; const float GAIN = 1.403178626e+01f; private float[] xv = new float[NZEROS+1]; private float[] yv = new float[NPOLES + 1]; public float Filter(float inValue) { xv[0] = xv[1]; xv[1] = xv[2]; xv[2] = xv[3]; xv[3] = xv[4]; xv[4] = inValue / GAIN; yv[0] = yv[1]; yv[1] = yv[2]; yv[2] = yv[3]; yv[3] = yv[4]; yv[4] = (xv[0] + xv[4]) + 4 * (xv[1] + xv[3]) + 6 * xv[2] + (-0.1641503452f * yv[0]) + (0.4023376691f * yv[1]) + (-0.9100943707f * yv[2]) + (0.5316388226f * yv[3]); return yv[4]; } } ``` To test it I created a sine wave "chirp" from 20Hz to 8kHz using Audacity. The test signal looks like this: ![test signal](https://i.stack.imgur.com/BcSDx.png) After filtering it I get: ![filtered spectrum](https://i.stack.imgur.com/reAhL.png) The waveform shows that the filter is indeed reducing the amplitude of frequencies above 4kHz, but I have a load of noise added to my signal. This seems to be the case whichever of the filter types I try to implement (e.g. Butterworth, Raised Cosine etc). ![filtered waveform](https://i.stack.imgur.com/1ECba.png) Am I doing something wrong, or do these filters simply introduce artefacts at other frequencies? If I downsample using the naive approach of averaging every pair of samples, I don't get this noise at all (but obviously the aliasing is much worse).
Chebyshev LPF introducing noise
CC BY-SA 3.0
0
2011-05-05T10:46:22.403
2011-05-05T11:45:45.693
2011-05-05T11:34:54.707
7,532
7,532
[ "audio", "filter", "signal-processing", "downsampling" ]
5,896,491
1
null
null
-2
452
Cell have already an image (of size 320 * 103) and text "Highs And Lows from The 'Raly To Restore Sanity And...." as shown in first cell. My problem is that when I select any row for navigating to the detailsViewController the cellimage(of size 320 * 103) color should be change as like shown in below imageColor(orange color) (eg. third row). How can I do this? ![Image](https://i.stack.imgur.com/tsnPy.png)
How to change didSelectRow Color from blue to orange?
CC BY-SA 4.0
null
2011-05-05T10:49:47.270
2019-03-28T22:24:22.990
2019-03-28T22:24:22.990
472,495
704,126
[ "iphone", "objective-c", "uitableview" ]
5,896,574
1
null
null
1
2,211
I use WPF in language vb.net. Specific data is brought to `DataGrid`. When select a row at `DataGrid` but it is not selected exactly selected row. ![enter image description here](https://i.stack.imgur.com/xqQqL.png) when select row[2] in `DataGrid` but it select row[0]. How to select exactly selected row? [Source code here](http://dl.dropbox.com/u/16661867/WpfApplication2.rar)
Selected Row DataGrid in WPF (VB.NET)
CC BY-SA 3.0
null
2011-05-05T10:56:03.253
2014-07-07T09:07:32.167
2011-05-05T11:05:02.310
1,633,855
1,633,855
[ "wpf", "vb.net", "datagrid" ]
5,896,627
1
5,946,480
null
0
85
i have an app that when i run on xcode connects with the database and retrieves the required values PERFECTLY. ![enter image description here](https://i.stack.imgur.com/dUTya.png) But when i run the actual application in the Debug folder, it not only does not access the database , it also does not go into any of the functions in my code. ![enter image description here](https://i.stack.imgur.com/OYQ6J.png) Why can an application show this type of behaviour? It never happened before to me. I have an old copy of the code which works fine. I have clear the targets and built it like 10 times but still runs perfectly on xcode but the app individually isnt quite working.. Thanks in advance for any help . I am out of ideas and i have no direction to go to as from a programming perspective the code does its work.
mac osx Database access/crash
CC BY-SA 3.0
null
2011-05-05T10:59:28.920
2011-05-10T07:15:19.833
null
null
593,572
[ "debugging", "macos", "crash" ]
5,896,909
1
null
null
6
8,627
What is: On Host machine: Windows 7 Eclipse for PHP Developers Version: Helios Service Release 2 On guest machine: Linux debian squeeze I want to edit my remote project through SSH in Eclipse by using RSE. All is okay, I do so in Remote System Explorer perspective: ![screenshot1](https://i.stack.imgur.com/U90bB.png) Then I go to PHP perspective. Right click on project->Configure->Add PHP Support. And press `Ctrl+Shift+Space` or `Ctrl+Space`. No completions (code assist) available. ![screenshot2](https://i.stack.imgur.com/Jh9Bx.png) Okay I'm found this bug (at 2008) and solution description (at 2009): [Bug 251496](https://bugs.eclipse.org/bugs/show_bug.cgi?id=251496). I did so: > Here's my solution to the problem: I just deleted the RemoteSystemsTempFiles project in the PHPExplorer View and than recreated it as a PHP Project (New->PHP Project, ofcourse it has to be named again RemoteSystemsTempFiles). This worked for me, now code completion is ok, hope this helps. ![screenshot3](https://i.stack.imgur.com/v8sZb.png) It does not solve the problem. Because PHP Language library does not have Core API maybe... Help. Thanks.
Code Completion not working with remote file (with RSE)
CC BY-SA 3.0
0
2011-05-05T11:24:44.083
2013-07-23T13:09:12.697
2011-05-13T11:57:04.600
530,503
530,503
[ "eclipse", "eclipse-plugin", "eclipse-rse" ]