Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
3,223,058
1
3,223,163
null
0
81
Suppose that we have the following partial ER diagram: ![An ER diagram with 5 entities: messages, submissions, attachments, assignments, and lectures](https://dl.dropbox.com/u/151329/schema.png) Notice that the `attachments` table will subsequently be used for the messages', submissions', assignments', and lectures' attachments. The problem is with the 3 one-to-one relationships between `attachments` and `messages`, `submissions`, and `assignments`. According to CakePHP's conventions, `Message belongsTo Attachment` (and `Attachment hasOne Message`) because `Message` contains the foreign key (the same thing applies to the other 2 relationships). Of course, it makes more sense to say that `Message hasOne Attachment` (and that `Attachment belongsTo Message`). If we only had `messages` and `attachments`, it would be easy to "" the relationship by moving the foreign key to `attachments`. But the problem again is that `messages`, `submissions`, `assignments`, and `lectures` have relationships with the same `attachments` table. One way to get the "" relationships is to have 4 different `Attachment` models: `MessageAttachment`, `SubmissionAttachment`, `AssignmentAttachment`, and `LectureAttachment`. Assuming we are only interested in retrieving the attachment of a certain message, submission, or assignment, `Attachment`
Is it OK to use "semantically reversed" associations, like Message blongsTo Attachment, in CakePHP?
CC BY-SA 2.5
null
2010-07-11T12:38:47.737
2010-07-11T13:25:18.420
2017-02-08T14:28:18.707
-1
1,173
[ "sql", "database-design", "data-modeling", "associations", "erd" ]
3,224,434
1
3,224,886
null
0
1,439
Im posting from my phone so please excuse stupid typos and formatting issues. I have an activity which lists saved games that the player can load. I created a simple layout xml file which defines a ScrollView. On load, I grab all the saved games and programatically add a view for each saved game to a vertically oriented LinearLayout child of the ScrollView. The view for each game consists of a Horizontally oriented LinearLayout which in turn contains a Button and a vertically oriented LinearLayout. That LinearLayout in turn contains some TextViews and ImageViews (and one more LinearLayout which I'm ommitting here for the sake of clarity). The hierarchy looks something like this (some details omitted). ``` ScrollView LinearLayout - vertical Each saved game: LinearLayout - horizontal Button - load game LinearLayout - vertical TextView - game name TextView - date string ``` I would like the top of the button and the "game name" texview to be vertically aligned but the TextView (or maybe it's LinearLayout parent) has some rogue padding on top that I can't get rid of. See screenshot for details. ![alt](https://i.imgur.com/sTUgE.png) LoadSaved class: Note: mScrollView is badly named. It refers to the ScrollView's child LinearLayout. ``` public class LoadSaved extends Activity { public LinearLayout mScrollView; private MinerDb mDb; public void onCreate(Bundle b) { super.onCreate(b); setContentView(R.layout.loadsaved); mDb = new MinerDb(this); mScrollView = (LinearLayout) findViewById(R.id.load_scroll_view); Bundle[] savedGames = mDb.getSavedGames(); for (int i = 0; i < savedGames.length; i++) { Bundle game = savedGames[i]; final int gameId = game.getInt("gameId"); String name = game.getString("name"); String date = game.getString("date"); Bundle player = game.getBundle("player"); int playerMoney = player.getInt("money"); int playerHealth = player.getInt("health"); LinearLayout gameContainer = new LinearLayout(getApplicationContext()); gameContainer.setPadding(5, 5, 5, 5); gameContainer.setGravity(Gravity.TOP); gameContainer.setOrientation(LinearLayout.HORIZONTAL); gameContainer.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); Button loadButton = new Button(getApplicationContext()); loadButton.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); loadButton.setText("Load"); LinearLayout gameInfo = new LinearLayout(getApplicationContext()); gameInfo.setOrientation(LinearLayout.VERTICAL); gameInfo.setPadding(10,0,10,10); gameInfo.setGravity(Gravity.TOP); gameInfo.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); TextView nameView = new TextView(getApplicationContext()); nameView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); nameView.setGravity(Gravity.TOP); nameView.setText(name); TextView dateView = new TextView(getApplicationContext()); dateView.setPadding(5,0,0,0); dateView.setGravity(Gravity.TOP); dateView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); dateView.setText(date); LinearLayout playerView = new LinearLayout(getApplicationContext()); playerView.setOrientation(LinearLayout.HORIZONTAL); playerView.setPadding(5,0,0,0); playerView.setGravity(Gravity.TOP); playerView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); TextView playerMoneyView = new TextView(getApplicationContext()); playerMoneyView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); playerMoneyView.setPadding(0,0,10,0); playerMoneyView.setTextColor(Color.GREEN); playerMoneyView.setText("$" + playerMoney); TextView playerHealthView = new TextView(getApplicationContext()); playerHealthView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); playerHealthView.setPadding(0,0,10,0); playerHealthView.setTextColor(Color.RED); playerHealthView.setText(playerHealth + "%"); playerView.addView(playerMoneyView); playerView.addView(playerHealthView); gameInfo.addView(nameView); gameInfo.addView(dateView); gameInfo.addView(playerView); gameContainer.addView(loadButton); gameContainer.addView(gameInfo); mScrollView.addView(gameContainer); loadButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { Log.e("LoadSaved", "LoadSaved::onCreate: Clicking: " + gameId); Intent loadGameIntent = new Intent(LoadSaved.this, Miner.class); loadGameIntent.putExtra("load_game", gameId); startActivity(loadGameIntent); finish(); } }); } } } ``` loadsaved.xml ``` <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/load_scroll_view" /> </ScrollView> </LinearLayout> ```
Problems vertically aligning a Button and horizontally oriented LinearLayout within a vertcally oriented LinearLayout
CC BY-SA 2.5
null
2010-07-11T19:56:12.940
2010-07-11T22:33:18.623
2010-07-11T20:20:03.050
1,742,702
1,742,702
[ "android", "user-interface", "vertical-alignment" ]
3,224,848
1
null
null
0
1,101
I'm trying to install PEAR, but I'm confused by the locations suggested. I'm using [Wampserver](http://www.wampserver.com/) to run my PHP scripts, and I wanted to do unit tests. So I found PEAR. I tried installing via the go-pear.bat file, but that didn't work. I found out more about this here: [http://blog.pear.php.net/2009/07/01/php-53-windows-and-pear/](http://blog.pear.php.net/2009/07/01/php-53-windows-and-pear/) So I downloaded the php file. The comments in the file suggest I > Put go-pear.php on your webserver, where you would put your website I find this a little strange. Still, I put it in the folder along with the other php files. Here's what I was presented with: ![alt text](https://imgur.com/j9YJd.png) Maybe it is because I'm not very experienced with this, but I would initially believe I should put PEAR in a central location, using 1 pear install for all possible future projects. Or is this the prefered configuration? And why?
PEAR location on install?
CC BY-SA 2.5
null
2010-07-11T22:22:58.870
2010-09-21T13:56:46.340
2010-07-12T15:15:03.833
80,907
80,907
[ "php", "windows", "pear", "wampserver" ]
3,225,113
1
3,229,439
null
4
1,303
In interface builder I added a menu item to the main menu. I can click on the menu and access its contents, however the title of the menu item doesn't show when running the program. The image shows the application and its menu on top and on the bottom is the application as it appears in IB. Notice that where the menu in IB has the "Calculate" menu option, the running application has in its menu a space instead. ![](https://imgur.com/54Rbj.png)
Menu item doesn't show when creating menu in Interface Builder
CC BY-SA 2.5
null
2010-07-11T23:49:55.310
2010-07-12T15:55:17.573
2010-07-12T09:33:55.253
209,512
209,512
[ "cocoa", "interface-builder" ]
3,225,138
1
3,225,161
null
3
10,262
I have a class which I use to plot things then save them to a file. Here's a simplified version of it: ``` import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt class Test(): def __init__(self, x, y, filename): fig = plt.figure(1) ax = fig.add_subplot(111) ax.plot(x, y, 'D', color='red') ax.set_xbound(-5,5) ax.set_ybound(-5,5) plt.savefig('%s.png' % filename) test1 = Test(1,2, 'test1') test2 = Test(2,4, 'test2') ``` Here are the results: test1 ![](https://imgur.com/bwo2S.png) test2 ![](https://imgur.com/aKu3N.png) The problem is that the test2 image also has the point from test1. The graphs are generated dynamically in a loop so I can't hardcode the figure number. I could make a counter and pass it to the class constructor but I was wondering if there's a more elegant way to do this. I tried deleting the test1 object but that didn't do anything.
Matplotlib: plot multiple graphs using same figure, without them overlapping
CC BY-SA 2.5
null
2010-07-11T23:59:13.823
2010-07-12T00:06:39.170
null
null
287,491
[ "python", "matplotlib" ]
3,226,116
1
3,228,550
null
3
640
I'm not sure if this is possible, but basically I have two degrees that will change the width/size and skew of an image. In a tranformation matrix (`<Matrix3DProjection/>`), it works like this: So if I have `X = 30°` and `Y=40°`, my matrix is: So ![normal](https://lh6.ggpht.com/_vm4C26HAULw/TDqpHdeCOeI/AAAAAAAAAIc/v1xFSjibQvI/s128/normal.jpg) becomes ![30x40](https://lh4.ggpht.com/_vm4C26HAULw/TDqpGxbenKI/AAAAAAAAAIY/Ky_N6pfiIag/s128/30x40.jpg) What I'd like to use instead is a `<TransformGroup/>` but can't quite figure out the `<SkewTransform AngleY="???"/>` portion. The `<ScaleTransform/>` seems easy enough by using and values above in `ScaleX` and `ScaleY` like `<ScaleTransform ScaleX=".866" ScaleY=".766"/>`. But I can't figure out the `AngleY` portion of `<SkewTransform/>` from an `M12` value of . I know that from doinking around with this manually, a value of `AngleY="20.3"` seems very accurate. But I can't figure out the math behind this. Does anyone know?
Creating a Skew AngleY from a Skew Factor for a Rhomboid in XAML
CC BY-SA 2.5
0
2010-07-12T05:45:03.263
2010-07-12T12:37:50.050
2017-02-08T14:28:19.730
-1
149,573
[ "wpf", "silverlight", "math", "geometry", "skew" ]
3,226,666
1
3,226,822
null
-1
235
For an example input of: ``` <a href="abc" something=b foo="bar" baz=cool> ``` I am trying to match: ``` something=b baz=cool ``` However, everything I end up with will only match the first one (something=b), even when using preg_match_all. The regular expression I am using is: ``` <\w+.*?(\w+=[^"|^'|^>]).*?> ``` Or: ``` <\w+ # Word starting with < .*? # Anything that comes in front of the matching attribute. ( \w+ # The attribute = [^"|^'|^>]+? # Keep going until we find a ", ' or > ) .*? # Anything that comes after the matching attribute. > # Closing > ``` I'm probably doing something horribly wrong, pretty new to regular expressions. Please advise! :) edit: Revised regular expression: ``` <\w+.*?\w+=([^"\'\s>]+).*?> ``` ![](https://imgur.com/SZYGd.png) I want it to match zzz=aaa there too ;)
Regex: matching all improper tag attributes
CC BY-SA 2.5
null
2010-07-12T07:49:32.057
2011-11-13T12:20:57.647
2010-07-12T08:18:07.267
51,133
51,133
[ "php", "regex" ]
3,226,721
1
null
null
0
232
I want to know How does this menu? menu like this: ![enter image description here](https://i.stack.imgur.com/JE8Dn.jpg)
How can i make this menu on iphone?
CC BY-SA 3.0
null
2010-07-12T07:58:47.813
2012-03-07T17:44:04.217
2012-03-07T17:44:04.217
689,356
389,273
[ "iphone" ]
3,226,730
1
null
null
0
3,899
I have a simple page to run commands I enter using and show the output. - - - However, calling PHP with an invalid parameter () shows PHPs usage:Usage: php [-q] [-h] [-s] [-v] [-i] [-f ] php [args...] I attached a couple of images to show what I mean. doesn't produce expected output ![PHP -v doesn't produce expected output](https://i.imgur.com/qSOUg.png) shows PHP's usage ![PHP -z shows PHP's usage](https://i.imgur.com/DLSB8.png) Any ideas? ``` <?php if ( isset ( $_POST['submit'] ) ) : $response = shell_exec ( escapeshellcmd ( stripslashes ( $_POST['cmd'] ) ) ); endif; ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <style type="text/css"> pre#response { border: 1px solid #e0e0e0; padding: .5em; } </style> <title>Command</title> </head> <body> <form action="cmd.php" method="post"> <p><input type="text" name="cmd" id="cmd" value="<?php echo @htmlspecialchars ( stripslashes ( $_POST['cmd'] ) ); ?>" size="50" /> <button type="submit" name="submit" id="submit" value="Submit">Submit</button> </p> </form> <?php if ( isset ( $response ) ) : ?> <pre id="response"><?php if ( empty ( $response ) ) : echo 'No response.'; else : echo htmlspecialchars ( $response ); endif; ?></pre> <?php endif; ?> </body> </html> ```
PHP - Calling .php file from command line produces no output
CC BY-SA 2.5
null
2010-07-12T07:59:45.780
2012-06-11T11:56:22.847
2010-07-12T08:08:04.030
308,124
308,124
[ "command-line", "php" ]
3,226,975
1
3,630,937
null
34
42,991
I'm using the resp. the in Eclipse. It always opens in the tab : ![Editor tabs](https://i.stack.imgur.com/Zx8NH.jpg) Is it possible to tell Eclipse it should always open this editor in the tab?
How to set default editor tab in Eclipse?
CC BY-SA 3.0
0
2010-07-12T08:46:39.760
2017-01-10T20:02:18.553
2017-01-10T20:02:18.553
880,772
32,043
[ "eclipse", "settings" ]
3,227,105
1
null
null
0
661
I use just UITableViewCell. It occur only in real device(version 3.1.2) and in simulator(version 3.1.2) doesn't have any problem. Thank you for your advice. Here is my problem image ![http://www.freeimagehosting.net/image.php?00252c143c.png](https://i.stack.imgur.com/fQRcC.png)
Issue about vertical text alignment in UITableViewCell (iPhone)
CC BY-SA 3.0
0
2010-07-12T09:08:39.260
2011-11-28T06:32:30.107
2011-11-28T06:32:30.107
234,976
387,397
[ "iphone", "mono", "vertical-alignment" ]
3,227,737
1
3,229,063
null
0
444
I'm using . I styled my "input file" that looks like this: ![](https://i.stack.imgur.com/Iuvp3.jpg) Here is the code: (live example [here](https://jsfiddle.net/ZDzbq/1/)) HTML: ``` <div id="wrapper"> <div id="customButton"> <img src="http://i28.tinypic.com/2nv5lww.png" /> <span>Choose Files</span> </div> <input id="fileInput" type="file" size="1" /> </div> ``` CSS: ``` #wrapper { position: relative; width: 339px; height: 66px; background: -moz-linear-gradient(-70deg, rgba(1, 36, 68, 0.9), rgba(10, 103, 196, 0.9)); -moz-box-shadow: inset -20px -20px 20px -20px rgba(0, 0, 0, 0.9), inset 20px 20px 20px -20px rgba(255, 255, 255, 0.7); } #fileInput { opacity: 0; font-size: 50px; } img { width: 45px; height: 45px; position: absolute; left: 35px; top: 12px; } span { position: absolute; left: 95px; top: 7px; font-size: 40px; color: white; } ``` The only problem is that when the mouse is over this custom button, the cursor changes between `text` and `default` because of the underlying "input file" (which is not visible). Does anyone has an idea how could I set the cursor to `pointer`, for example, when the mouse hovers the button ? Thanks a lot !!
Styling “input file” - works great, but there is a little annoying problem
CC BY-SA 4.0
null
2010-07-12T10:40:30.167
2019-08-01T21:04:20.883
2019-08-01T21:04:20.883
4,751,173
247,243
[ "css", "file-io", "firefox3.6" ]
3,228,323
1
3,249,678
null
1
1,362
How to put the vertical scroll bar on the left hand side of the tree? ![alt text](https://i24.photobucket.com/albums/c31/plasticfloor/scroll.jpg)
SWT tree > move the vertical scrollbar to the left of the tree without changing the orientation
CC BY-SA 4.0
0
2010-07-12T12:06:02.963
2018-09-23T19:24:12.037
2018-09-23T19:24:12.037
1,033,581
216,275
[ "java", "tree", "swt", "scrollbar" ]
3,228,361
1
3,229,367
null
15
18,583
I am trying to convert a PIL image into an array using NumPy. I then want to convert that array into Lab values, modify the values and then convert the array back in to an image and save the image. I have the following code: ``` import Image, color, numpy # Open the image file src = Image.open("face-him.jpg") # Attempt to ensure image is RGB src = src.convert(mode="RGB") # Create array of image using numpy srcArray = numpy.asarray(src) # Convert array from RGB into Lab srcArray = color.rgb2lab(srcArray) # Modify array here # Convert array back into Lab end = color.lab2rgb(srcArray) # Create image from array final = Image.fromarray(end, "RGB") # Save final.save("out.jpg") ``` This code is dependent on PIL, NumPy and . color can be found in the SciPy trunk [here](http://svn.scipy.org/svn/scipy/tags/pre_org/Lib/image/color.py). I downloaded the color.py file along with certain [colordata .txt files](http://svn.scipy.org/svn/scipy/tags/pre_org/Lib/image/). I modified the color.py so that it can run independently from the SciPy source and it all to work fine - values in the array are changed when I run conversions. My problem is that when I run the above code which simply converts an image to Lab, then back to RGB and saves it I get the following image back: ![alt text](https://imgur.com/kI2WY.jpg) What is going wrong? Is it the fact I am using the functions from color.py? For reference: Source Image - [face-him.jpg](https://imgur.com/81SSp.jpg) All source files required to test - [colour-test.zip](http://www.maxnov.com/colour-test.zip)
Using PIL and NumPy to convert an image to Lab array, modify the values and then convert back
CC BY-SA 2.5
0
2010-07-12T12:10:02.080
2010-07-14T21:33:50.683
null
null
239,241
[ "python", "colors", "numpy", "python-imaging-library", "color-space" ]
3,229,442
1
3,229,845
null
15
10,468
I don't quite understand what makes matrix multiplication in C#/.NET (and even Java) so slow. [source](https://www.tommti-systems.de/go.html?http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html) Trying to find an updated benchmark. ![Java vs C# vs C++ breakdown](https://web.archive.org/web/20130606093053/http://img411.imageshack.us/img411/9324/perf.gif) C#'s integer and double performance is damn close to C++ compiled with MSVC++. 87% as fast for double and 99% as fast for 32-bit integer. Pretty damn good, I'd say. But then look at matrix multiplication. The gap widens to C# being about 19% as fast. This is a pretty huge discrepancy that I don't understand. Matrix multiplication is just a bunch of simple math. How is it getting so slow? Shouldn't it be roughly as fast as an equivalent number of simple floating point or integer operations? This is especially of a concern with games and with XNA, where matrix and vector performance are critical for things like physics engines. Some time ago, Mono added support for SIMD instructions through some nifty vector and matrix classes. It closes the gap and makes Mono faster than hand-written C++, although not as fast as C++ with SIMD. ([source](https://stackoverflow.com/questions/2348967/c-c-versus-java-c-in-high-performance-applications)) [](https://i.stack.imgur.com/130dt.png) What's going on here? Edit: Looking closer, I misread the second graph. C# appears pretty close. Sorry, I missed the version number on the first benchmark. I grabbed it as a handy reference for the "C# linear algebra is slow" that I've always heard. I'll try to find another.
Why is matrix multiplication in .NET so slow?
CC BY-SA 4.0
0
2010-07-12T14:39:26.357
2022-12-30T11:14:59.447
2019-08-01T21:05:41.880
4,751,173
57,776
[ "c#", ".net", "performance", "xna", "matrix-multiplication" ]
3,229,459
1
3,229,582
null
44
12,699
Let's imagine we have a plane with some points on it. We also have a circle of given radius. I need an algorithm that determines such position of the circle that it covers maximal possible number of points. Of course, there are many such positions, so the algorithm should return one of them. Precision is not important and the algorithm may do small mistakes. Here is an example picture: ![Example](https://i.stack.imgur.com/XGdiJ.png) Input:   `int n` (n<=50) – number of points;   `float x[n]` and `float y[n]` – arrays with points' X and Y coordinates;   `float r` – radius of the circle. Output:   `float cx` and `float cy` – coordinates of the circle's center Lightning speed of the algorithm is not required, but it shouldn't be too slow (because I know a few slow solutions for this situation). C++ code is preferred, but not obligatory.
Algorithm to cover maximal number of points with one circle of given radius
CC BY-SA 3.0
0
2010-07-12T14:44:12.860
2019-10-25T11:12:36.110
2012-02-12T17:11:01.327
241,039
241,039
[ "c++", "algorithm", "geometry", "points" ]
3,230,171
1
3,237,210
null
6
2,194
I'm not sure if this is the right place to ask, but here goes... I'm trying to compute the orientation of a triangle on a plane, formed by the intersection of 3 edges, without explicitly computing the intersection points. I need to triangulate a PSLG on a triangle in 3D. The vertices of the PSLG are defined by the intersections of line segments with the plane through the triangle, and are guaranteed to lie within the triangle. Assuming I had the intersection points, I could project to 2D and use a point-line-side (or triangle signed area) test to determine the orientation of a triangle between any 3 intersection points. The problem is I can't explicitly compute the intersection points because of the floating-point error that accumulates when I find the line-plane intersection. To figure out if the line segments strike the triangle in the first place, I'm using some freely available robust geometric predicates, which give the sign of the volume of a tetrahedron, or equivalently which side of a plane a point lies on. I can determine if the line segment endpoints are on opposite sides of the plane through the triangle, then form tetrahedra between the line segment and each edge of the triangle to determine whether the intersection point lies within the triangle. Since I can't explicitly compute the intersection points, I'm wondering if there is a way to express the same 2D orient calculation in 3D using only the original points. If there are 3 edges striking the triangle that gives me 9 points in total to play with. Assuming what I'm asking is even possible (using only the 3D orient tests), then I'm guessing that I'll need to form some subset of all the possible tetrahedra between those 9 points. I'm having difficultly even visualizing this, let alone distilling it into a formula or code. I can't even google this because I don't know what the industry standard terminology might be for this type of problem. Any ideas how to proceed with this? Thanks. Perhaps I should ask MathOverflow as well... EDIT: After reading some of the comments, one thing that occurs to me... Perhaps if I could fit non-overlapping tetrahedra between the 3 line segments, then the orientation of any one of those that crossed the plane would be the answer I'm looking for. Other than when the edges enclose a simple triangular prism, I'm not sure this sub-problem is solvable either. EDIT: The requested image. ![alt text](https://imgur.com/JkwWg.jpg)
Computational geometry, tetrahedron signed volume
CC BY-SA 2.5
0
2010-07-12T16:18:30.537
2017-06-19T00:56:43.780
2015-03-05T01:48:13.227
1,118,321
203,500
[ "math", "geometry" ]
3,231,683
1
3,231,754
null
0
489
I am dealing with a pretty standard (or so I thought) page. What I would like to do is allow the page to have it's width determined by the `<body>` tag and a top level `.page` style that I've defined in my css. My site has a left navigation pane that is ALWAYS a certain width. The "content" area stretches with the page and should determined by the remaining space that consumes the users screen. I'd like to show scrollbars on content that does not "keep the peace" with my floating area width. For example, I've recently come upon a series of sub elements that need scrollbars displayed to keep the page from stretching off into eternity. Here is a simple image of how things look when scrollbars aren't needed: ![alt text](https://sites.google.com/a/hardbarger.com/lucas-home-page/downloads/Screenshot2010-07-12at3.30.49PM.png?attredirects=0) Here is what it looks like when my sub content is wider than the page: ![alt text](https://sites.google.com/a/hardbarger.com/lucas-home-page/downloads/Screenshot2010-07-12at3.31.26PM.png?attredirects=0) What I'd like to do is show scrollbars on the red sections when they fulfill their allowed space (including margins and padding). I would like for everything to be padded nicely against the blue section so that the yellow and white sections don't get overlapped. I've attached the html that I used to make up this display, because I couldn't think of a better way to describe my approach: ``` <html> <head> <style type="text/css"> body { background-color: gray; } .page /* page is always centered on screen */ { background-color: white; width: 90%; margin-left: auto; margin-right: auto; padding: 10px; } .nav-pane /* navigation pane is always 100px */ { width: 100px; height: 100%; background-color: green; } .nav-pane > div { width: 100px; } .content-pane /* content pane should size with page */ { background-color: yellow; margin: 10px; } .content-pane > div /* !!! SHOULD NOT STRETCH !!! */ { position: relative; overflow: auto; background-color: blue; padding: 10px; margin: 10px; color: white; } .content-pane > div > * { clear: both; } .content /* content div holds tables, images, paragraphs, etc.. */ { background-color: red; float: left; margin-bottom: 20px; } #small /* one is small */ { width: 200px; } #big /* one is BIG! */ { width: 4000px; } </style> </head> <body> <div class="page"> <table width="100%" style="border: solid black"> <tr> <td class="nav-pane"> <div> I am the nav-pane </div> </td> <td class="content-pane"> <div> I am the content pane <h2>I am a heading</h2> <div class="content"> <div id="small">Scrollbar not needed</div> </div> <h2>I too am a heading</h2> <div class="content"> <div id="big">I require a scroll bar to keep this page pretty... :(</div> </div> </div> </td> </tr> </table> </div> </body> </html> ``` Is what I'm trying to do even possible without using javascript? Thanks in advance for any insight...
How to configure a child div to display scrollbars only when a parent div percentage settings require it
CC BY-SA 2.5
null
2010-07-12T19:41:11.530
2010-07-12T20:09:17.210
2017-02-08T14:28:23.120
-1
84,406
[ "html", "css" ]
3,232,430
1
20,021,991
null
3
6,713
How to make menu HTML/CSS? `li` ![100% horizontal cross-browser menu HTML/CSS example](https://lh4.ggpht.com/_aamJGQI2gQ0/TDt-ZwIJMTI/AAAAAAAAAO0/6J_Yni4FQmI/nav.gif) Example for example: ``` /*CSS doesn't make `block` right/left space between `li` items (see attached image)*/ #nav{ text-align:justify; } #nav li{ /*border:1px solid #000; margin-right:1px; margin-left:1px;*/ display:inline-block; white-space:nowrap; } #nav li#span{ /*hack to make 100% horizontal*/ display:inline-block; width:100%; height:1px; } *html #nav li,*html #nav li#span,*+html #nav li,*+html #nav li#span{ /*IE6/7 hacks tah are not working*/ display:inline; } ``` and: ``` <div id="nav"> <ul> <li>Home <!--unfortunately it doesn't work without space after each list, need for some solution--></li> <li>Services </li><!--don't want to add style for each list separated--> <li>Portfolio </li> <li>Clients </li> <li>Articles </li> <li>Contact Us </li> <li id="span"></li><!--don't like to add any extra tag (like this), but other way it doesn't work, need for some solution--> </ul> </div> ```
100% horizontal cross-browser menu HTML/CSS?
CC BY-SA 2.5
0
2010-07-12T21:30:58.147
2013-11-16T18:16:46.357
2017-02-08T14:28:23.467
-1
351,900
[ "html", "css", "menu", "cross-browser", "html-lists" ]
3,232,489
1
null
null
0
515
I have boxes that have been designed like this ![imgur.com/vMN0T.gif](https://i.stack.imgur.com/J9p1p.gif) Basically I need to code them so that they can be any size height-wise and width-wise depending on the content inside. Plus the shadow effect needs to be transparent because the background color can change. Best way to do this so it works in all browsers? (IE6+, FF, Opera, Safari, Chrome)
Best way to code curved shadowed boxes for cross-browser compatibility
CC BY-SA 3.0
null
2010-07-12T21:41:58.557
2011-12-04T01:44:28.307
2011-12-04T00:41:03.267
84,042
389,893
[ "html", "css", "rounded-corners", "shadow" ]
3,234,338
1
null
null
0
707
Is it possible to add images and columns to Picker View in XCode Interface Builder? Image here: ![example](https://i.stack.imgur.com/Vi59v.jpg) [http://media.tumblr.com/tumblr_l5fgqaBrEo1qar71d.jpg](http://media.tumblr.com/tumblr_l5fgqaBrEo1qar71d.jpg) I'm supposed to come up with something similar.. and I'm quite new to developing iphone app, but do have experience of C#/Java... any tips/inputs? thanks in advance!!
XCode- is it possible to add columns and images to PickerView in Interface Builder?
CC BY-SA 3.0
null
2010-07-13T05:08:45.413
2011-12-21T22:27:33.833
2011-12-21T22:27:33.833
53,195
328,447
[ "iphone", "xcode", "view", "picker" ]
3,235,190
1
3,235,322
null
12
18,422
I know that each file has metadata like title, subject, keywords and comments: ![enter image description here](https://i.stack.imgur.com/5eloC.jpg) But what if I need custom metadata like for example? Is it possible to do it with C#?
Is it possible to add custom metadata to file?
CC BY-SA 4.0
0
2010-07-13T08:03:33.003
2022-10-28T06:35:31.863
2022-08-04T16:05:26.277
14,438,770
2,246,271
[ "c#", "file-io", "metadata", "xmp" ]
3,236,399
1
3,237,923
null
17
11,998
I lost the squiggly red underline feature in Visual Studio 2010. I experimented with some plugins/extensions like Coderush/Code map. I have reset all settings for fonts and colors to "use default" but the squiggly red underline feature does'nt return. Any ideas? ![alt text](https://spsexton.files.wordpress.com/2010/06/05-generatemenu.jpg?w=266&h=115) EDIT: I did uninstall all extensions/plugins except the visual studio color theme editor - it makes no difference.
I lost the squiggly red underline feature
CC BY-SA 2.5
0
2010-07-13T10:52:54.093
2019-08-02T03:04:39.463
2017-02-08T14:28:24.143
-1
138,078
[ "visual-studio-2010" ]
3,238,547
1
3,238,737
null
4
3,993
I'm trying to get Time Profiler to play nice with me. I am able to set it up with my iPhone and capture data. However, Instruments doesn't really show much information about where the virtual bottlenecks exist in my code. If I click on the memory addresses to show more detail Instruments tells me that they're unavailable. How can I get the info I need to optimize my code? Screenshot: ![http://tinypic.com/r/4ikah2/3](https://i.stack.imgur.com/oN0An.png)
How to use Time Profiler Instrument with iPhone Device
CC BY-SA 3.0
null
2010-07-13T15:09:36.320
2012-01-17T15:01:17.637
2012-01-17T15:01:12.363
237,260
389,608
[ "iphone", "optimization", "time", "profiler", "instruments" ]
3,239,120
1
3,243,276
null
8
6,511
This is a fairly lengthy (not overly complex) design question so please bear with me. I'm trying to implement a person/role management system with POJOs and JPA. I'm fairly new to ORM and this is mostly a mapping problem. I've got this working as POJOs and am comfortable with the caller-level API, but would now like to map it to a database using JPA or Hibernate in a Seam environment. My implementation is based on the Decorator (GoF) and Person Role Object patterns (Baumer/Riehle et al). All roles are hard-coded and run-time addition of new roles is not supported since it would require code changes to extend behavior. I'd use user groups to implement security and permissions. There is a Person interface with role management methods such as addRole(), removeRole(), hasRole(), getRole(), getRoles(), among other things. The concrete implementation is provided by a PersonImpl class. There is an abstract class Role which also implements the Person interface (for decorator substitution equivalence), and a RoleImpl class that extends it. The Role class holds a reference to a person instance, using it to service any method / property calls on the person interface, meaning all subclasses of Role can handle the Person interface. The role constructor takes the person object as a parameter. These are the interfaces/classes: ``` public interface Person { public String getFirstName(); public void setFirstName(String firstName); . . . public boolean isEnabled(); public void setEnabled(boolean enabled); public Set<Role> getRoles(); public Role addRole(Class<? extends Role> roleType); public void removeRole(Class<? extends Role> roleType); public boolean hasRole(Class<? extends Role> roleType); public Role getRole(Class<? extends Role> roleType); public enum Gender {MALE, FEMALE, UNKNOWN}; } public class PersonImpl implements Person { . . . } public abstract class Role implements Person { protected PersonImpl person; @Transient protected abstract String getRoleName(); protected Role() {} public Role(PersonImpl person) { this.person = person; } public String getFirstName() { return person.getFirstName(); } public void setFirstName(String firstName) { person.setFirstName(firstName); } public Set<Role> getRoles() { return person.getRoles(); } public Role addRole(Class<? extends Role> roleType) { return person.addRole(roleType); } . . . } public abstract class RoleImpl extends Role { private String roleName; protected RoleImpl() {} public RoleImpl(PersonImpl person) { super(person); } . . . } public class Employee extends RoleImpl { private Date joiningDate; private Date leavingDate; private double salary; public Employee(PersonImpl person) { super(person); } . . . } ``` This diagram shows the class relationships: ![](https://yuml.me/diagram/scruffy;dir:lr;scale:80/class/%5BPerson;%3C%3Cinterface%3E%3E%5D%5E-.-%5BPersonImpl%5D,%20%5BPerson;%3C%3Cinterface%3E%3E%5D%5E-.-%5BRole;%3C%3Cabstract%3E%3E%5D,%20%5BRole;%3C%3Cabstract%3E%3E%5D%5E-%5BRoleImpl%5D,%20%5BPersonImpl%5D%3C%3E-%3E%5BRoleImpl%5D,%20%5BPersonImpl%5D%3C-%5BRoleImpl%5D,%20%5BRoleImpl%5D%5E-%5BEmployee%5D,%20%5BEmployee%5D%5E-%5BTeacher%5D,%20%5BEmployee%5D%5E-%5BPrincipal%5D,%20%5BEmployee%5D%5E-%5BAccountant%5D,%20%5BRoleImpl%5D%5E-%5BParent%5D,%20%5BRoleImpl%5D%5E-%5BStudent%5D) (If you can't see the diagram inline, view it here [via yUML](https://yuml.me/diagram/scruffy;dir:lr;scale:80/class/%5BPerson;%3C%3Cinterface%3E%3E%5D%5E-.-%5BPersonImpl%5D,%20%5BPerson;%3C%3Cinterface%3E%3E%5D%5E-.-%5BRole;%3C%3Cabstract%3E%3E%5D,%20%5BRole;%3C%3Cabstract%3E%3E%5D%5E-%5BRoleImpl%5D,%20%5BPersonImpl%5D%3C%3E-%3E%5BRoleImpl%5D,%20%5BPersonImpl%5D%3C-%5BRoleImpl%5D,%20%5BRoleImpl%5D%5E-%5BEmployee%5D,%20%5BEmployee%5D%5E-%5BTeacher%5D,%20%5BEmployee%5D%5E-%5BPrincipal%5D,%20%5BEmployee%5D%5E-%5BAccountant%5D,%20%5BRoleImpl%5D%5E-%5BParent%5D,%20%5BRoleImpl%5D%5E-%5BStudent%5D)) I'd use these classes like so: ``` Person p = new Person("Doe", "John", Person.MALE, ...); // assuming Employee extends Role Employee e = (Employee)p.addRole(Employee.class); ``` Since the Role class also implements the Person interface, I can also do: ``` // assuming Parent extends Role Parent parent = new Parent((PersonImpl)p); e.addRole(Parent.class); e.getDateOfBirth(); // handled by the decorated person class // assuming Manager extends Employee extends Role Manager m = (Manager)p.getRole(Manager); if (m.hasRole(Employee.class) { // true since Manager derives from Employee } ``` The questions I have are: (a) Is this implementation needlessly complex and if so what would be a simpler approach? Note that this goes into a non-trivial business application and not a kiddy project, and I think the role subclassing is important to leverage behavior in cases such as Employee, Manager, etc. (b) How do I map this in JPA/Hibernate? (c) Can it be mapped so I can also take advantage of Seam Identity Management? (My definition of Role is clearly not analogous to Seam's) (d) If I go with a table-per-subclass (InheritanceType.JOINED) mapping strategy, I map PersonImpl as PERSONS and RoleImpl as ROLES tables, and map each subclass of RoleImpl (such as Employee and Parent) to their own tables as EMPLOYEES and PARENTS. I would then have a @ManyToMany relationship between PERSONS and ROLES (on the roles collection in PersonImpl), with the join-table PERSON_ROLES. Now the problem is that the EMPLOYEES and PARENTS tables, etc. have only the ROLE_ID reference, since the inheritance mapping strategy obviously considers them to be extensions to Roles (ROLES) whereas I need them as addendum to PERSON_ROLES, and require the USER_ID + ROLE_ID key to be resolved properly, or at least the USER_ID. I would prefer a normalized database with the attendant reliance on extra joins than a denormalized database which will be difficult to maintain and likely bunch up a ton of unused and irrelevant fields, which is why I think table-per-subclass is the way to go. Or is a table-per-class-hierarchy (InheritanceType.SINGLE_TABLE) with a discriminator column OK (from database maintenance perspective) in this scenario? Note that some roles are likely to have dozens of properties/fields. (e) Is there a better alternative to this design? Would very much appreciate any ideas/suggestions.
Inheritance mapping with JPA/Hibernate
CC BY-SA 2.5
0
2010-07-13T16:16:57.207
2010-07-14T10:40:24.733
2017-02-08T14:28:24.820
-1
145,348
[ "hibernate", "inheritance", "oop", "jpa", "seam" ]
3,239,336
1
3,239,413
null
16
13,283
I remember solving a lot of indefinite integration problems. There are certain standard methods of solving them, but nevertheless there are problems which take a combination of approaches to arrive at a solution. But how can we achieve the solution programatically. For instance look at the online integrator app of Mathematica. So how do we approach to write such a program which accepts a function as an argument and returns the indefinite integral of the function. ![wolfram mathematica online integrator](https://i852.photobucket.com/albums/ab82/rakeshkumar167/Capture.jpg) PS. The input function can be assumed to be continuous(i.e. is not for instance sin(x)/x).
How to calculate indefinite integral programmatically
CC BY-SA 2.5
0
2010-07-13T16:39:30.760
2010-07-13T17:08:41.603
2017-02-08T14:28:25.180
-1
364,402
[ "algorithm", "math" ]
3,240,571
1
3,240,639
null
0
125
![alt text](https://imgur.com/UfBcj.jpg) Here's what I have so far: ``` create table rubro ( id_rubro int primary key, nombre_rubro nvarchar(150) ) go create table cliente ( id_cliente int primary key, direccion nvarchar(400), telefono int, nit int ) ```
How can I create a table like this in Microsoft SQL?
CC BY-SA 2.5
null
2010-07-13T19:11:53.543
2010-07-13T19:20:24.583
2010-07-13T19:12:59.050
135,152
112,355
[ "sql", "sql-server" ]
3,240,900
1
3,240,993
null
3
358
At work, we use Perforce for version control. There are problems with this: 1) with this centralized model, we can't check in changes until they are ready for regression. This means that we have no revision control during the development process. 2) We don't back up our client view of the depot, so our work is unsafe until we can check it in. 3) We have problems sharing our code with each unless we beg to have an integration branch set up. I am trying to set up an optional git workflow for developers who want to use git to beat these problems. The plan is to use git-p4 to interface with the perforce server and create a private git repo. This takes care of 1). I plan to use the integration-manager workflow depicted in Git Pro ([http://progit.org/book/ch5-1.html](http://progit.org/book/ch5-1.html)) to have our developers publish public repos, taking care of 3). ![Blessed Repo](https://i.stack.imgur.com/dkUgM.png) Finally, I want a place where developers can push their changes so that they will pulled into nightly backups / offsite backups. The reason we don't backup our client views now is because doing nightly archival backups of everyone's client view is space inefficient. We have a lot of developers, and they produce a lot of code. We can't be redundantly backing up everyone's client view. We only want to preserve the only. My thinking was to have one bare git repo, call it `omni-backup`, that everyone can push all of their branches to (and feel free to suggest alternatives). This would utilize git's space efficient sha-1 hashing and ensure that only unique versions of each file are backed up. The trick is that all the backup repositories have to be part of the same repo to get the space efficiency. The problem is when two people with completely different branches chose the same name for their branch. E.G. Bob has a `feature` branch and Jane has a `feature` branch, but they're for different features. If Bob pushes to omni-backup, Jane won't be able to, as it wouldn't be a fastforward merge. Now what I would ideally want to have happen is that when Bob pushes his feature branch, the branch will be renamed to `bob-feature` on the `omni-backup` remote. And when he pulls feature from `omni-backup`, he gets back `bob-feature`. This doesn't seem terribly easy to accomplish in git. It looks like I can use push hooks documented in [http://www.kernel.org/pub/software/scm/git/docs/git-receive-pack.html](http://www.kernel.org/pub/software/scm/git/docs/git-receive-pack.html) post-receive hook to rewrite the name of the ref immediately after it written, and then could be done to reverse the process on the way back, but it feels fragile. Anyone have a better idea? --- edit: for VonC (Because code sucks in comments) Your way sounds promising, VonC, but I don't see how the fact that it's a fetch will beat the namespacing problems. Are you suggesting a cronjob that knows how to rename the branch? like (really dirty): ``` foreach my $user (@users) { my @branches = split(/s/,cat `$LDAPSERVER/$USER/$REPO/.git/refs/heads`); foreach my $branch (@branches) { system "git fetch $LDAPSERVER/$USER/$REPO/$BRANCH:+$USER$BRANCH" } } ```
Efficiently backup many versions of a git repo with branch namespacing
CC BY-SA 3.0
null
2010-07-13T19:49:56.747
2012-09-04T07:50:33.097
2012-09-04T07:50:33.097
6,309
86,432
[ "git", "perforce", "dvcs", "git-p4" ]
3,241,420
1
3,266,375
null
12
20,942
Consider the scenario of a user creating a new Team Project. The user is a developer who wants to create and manage their Team Project. - - The exception is > TF218027: the following reporting folder could not be created on the server running SQL Reporting Services. SQL Reporting services is running under an Active Directory service account created expressly for this purpose. ![alt text](https://i.imgur.com/LHoq1.png) The developer attempting this action is a member of a TFS group with the following permissions. ![alt text](https://i.imgur.com/ZOBs8.png)
Error TF218027 when creating a Team Project in TFS 2010
CC BY-SA 2.5
0
2010-07-13T20:50:39.227
2013-02-01T21:45:57.657
2010-07-14T02:59:46.107
23,199
23,199
[ "tfs", "permissions", "reporting-services" ]
3,241,519
1
3,242,562
null
1
1,367
I'm curious as to the 'proper' method for achieving the following functionality using Quarts2D: I want to have a view, and to be able to add a circle at any coordinate. As soon as I add the circle it should expand at a predefined rate; I'd also like to repeat this process and have a number if these expanding circles. Think Missile Command: ![Yellow spots keep expanding](https://upload.wikimedia.org/wikipedia/en/8/86/A5200_Missile_Command.png) Generally, if I was writing this in C++ using SDL or some other graphics library I would: Have a class to represent an 'growing circle' Have a vector/array to hold pointers to all the 'growing circles' I create. All circles diameters would be increased each tick, and in my renderloop I would iterate the list and draw appropriate circles to my buffer. This, however, doesn't seem to fit well with how I've generally used views in previous iPhone development. So I guess it's kind of open-ended, but is there a 'correct' way for something like this? Would it be in a game loop style (as described above), or should I be subclassing `UIView` for a 'circle' object, and override `drawRect`? I guess I would then have to add each circle by creating a view and adding it to my main view? Initial investigation also brought me across references to the [CAShapeLayer](http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/CAShapeLayer_class/Reference/Reference.html) class, though I'm guessing this might be much the same as implementing the UIView subclassing technique.
iPhone Quartz2D render expanding circle
CC BY-SA 2.5
0
2010-07-13T21:05:20.403
2010-07-14T00:29:28.637
2017-02-08T14:28:25.863
-1
168,610
[ "iphone", "graphics", "quartz-2d" ]
3,241,698
1
3,241,710
null
3
224
I'm not math savvy, but this Mathematica plot caught my eye and I was hoping you could help me identify it. I've searched the various functions and keywords found in the pictured code, but none of the results suggested anything specific to me about whatever algorithm is at work in this plot. ![Screenshot from Mathematica](https://i.stack.imgur.com/HTEGg.png) Sorry about the quality, it's a screen capture of a video
Identify the plot in this image
CC BY-SA 3.0
null
2010-07-13T21:28:02.650
2011-11-23T15:33:54.127
2011-11-23T15:33:54.127
390,911
390,911
[ "geometry", "wolfram-mathematica" ]
3,242,028
1
3,242,337
null
2
482
This is very programming related but a somewhat non-programming question. I am performing image scaling in a web based application and I need to maintain my image relative to a fixed location even though it scales anchored by its top, left corner. Hope the graphic make this possible. ![alt text](https://lh6.ggpht.com/_HjZMYRErCQk/TDzkU0jaVPI/AAAAAAAAAJI/qX6nsPL9noU/RecImage.gif) The idea is that C is a fixed location that I want to maintain as my scaling origin rather than B which which is the current css behavior. C may or may not be within the actual image. So as the image scale, B needs to move relative to C. Example: if the image was scaled 50%, then B would move 1/2 the distance to C. If the image grew to 200% of its size, then B would move twice the distance away from C. Ultimately looking for a formula for x & y for B given the location of C and a scaling factor for the image. Not sure the size of the image needs to be part of this but I have it if needed. Thanks for any help! Things I know: 1. I know the width and height of the image rectangle. 2. I know the offset of B from A. 3. I know the offset of C from A. 4. I know the scale factor in percent of the image.
Image scaling geometry
CC BY-SA 2.5
0
2010-07-13T22:20:39.017
2010-07-14T10:31:52.673
2017-02-08T14:28:26.880
-1
64,262
[ "asp.net", "css", "geometry" ]
3,242,505
1
3,242,524
null
14
9,989
I am creating a service using [CreateService](http://msdn.microsoft.com/en-us/library/ms682450%28VS.85%29.aspx). The service will run again fine if it happens to crash and I would like to have Windows restart the service if it crashes. I know it is possible to set this up from the services msc see below. ![Windows Service Recovery Dialog](https://lh3.ggpht.com/_zGR5JAiPoLk/TDzt4-23sQI/AAAAAAAAAm4/aN4nygpHsDc/s800/screen.jpg) How can I programatically configure the service to always restart if it happens to crash.
How to create service which restarts on crash
CC BY-SA 2.5
0
2010-07-14T00:15:20.413
2022-10-26T11:57:29.307
2017-02-08T14:28:27.217
-1
1,675
[ "c++", "windows", "winapi", "service" ]
3,242,796
1
3,243,006
null
4
2,330
In MATLAB, is it possible to create a single graph of two related data sources with the first source plotted along the bottom of the x-axis and the 2nd source plotted down from the top of the x-axis? I can't find anywhere in the MATLAB documentation where this is done. The final graph I need is in a form like this: ![http://www.epa.gov/ncer/progress/images/R827933C033_02_003.gif](https://i.stack.imgur.com/Ave0A.gif)
Matlab, graph two data series in one graph
CC BY-SA 3.0
null
2010-07-14T01:39:05.560
2016-03-28T08:15:08.860
2016-03-28T08:13:25.723
97,160
296,238
[ "matlab", "plot", "graph", "bar-chart", "stacked-chart" ]
3,242,986
1
null
null
4
759
I want to use EGit in a small eclipse project with my colleagues, but we don't want to Submit the project to the github.com. What I should do with the next picture ? The ip address is 192.168.16.40 and the project is in D:\EclipseProjects\ForwardA.git. How I should fill the URI,Host,Repository Path ? Is the Authentiacation for the computer or git ? ![alt text](https://i983.photobucket.com/albums/ae311/keatingWang/egit.png)
Can I use git in local area network?
CC BY-SA 2.5
0
2010-07-14T02:26:41.447
2011-07-06T12:19:35.700
2017-02-08T14:28:27.883
-1
292,084
[ "java", "eclipse", "git" ]
3,243,796
1
3,243,852
null
2
40
In the image below, why does task X, appear two times for unit 0 at clock cycles 4 and 5? have to make a program for the arrangement of the pipeline, but I need to know why the above happens to complete it. Is it just because the author wants it to repeat?? ![Diagram of pipeline](https://i.stack.imgur.com/3ZY1Z.jpg)
Why does task X, appear two times for unit 0 at clock cycles 4 and 5?
CC BY-SA 3.0
null
2010-07-14T06:17:05.897
2012-04-29T13:38:03.657
2012-04-29T13:38:03.657
null
287,745
[ "cpu", "pipeline", "cpu-architecture" ]
3,243,999
1
null
null
0
130
I was wondering what kind of model / method / technique might use to achieve this model: ![alt text](https://1.bp.blogspot.com/_CkizHsl86-c/Spg-yOnC3EI/AAAAAAAAARI/-rB0DbJDIXs/s400/over+time+trendly.png) [It tries to find the moments where significant changes set in and ignores random movements] Any pointers very welcome! :)
How to detect a trend inside unsteady data (e.g. Trendly)?
CC BY-SA 2.5
null
2010-07-14T07:03:26.460
2010-08-09T19:30:16.360
2017-02-08T14:28:28.567
-1
213,730
[ "math", "google-analytics" ]
3,244,320
1
3,244,377
null
45
34,617
After doing some search on SO, Google and MSDN forums I've become frustrated that there is so little information for what might seem like an obvious question and possibly a dumb question. I need to use source control in Visual Studio 2010 Professional. I do not have separate Team Foundation Server 2010. Some people have mentioned SourceSafe? I haven't seen any SourceSafe inside of the Visual Studio 2010 to be honest. What are some alternatives (preferably free) for source control in Visual Studio 2010? Or is it already integrated in Visual Studio 2010 that I am so blind to have missed that? : It's been almost a year since I have asked this question. I highly recommend using either or over Subversion. So for those of you who are looking for Visual Studio 2010 version control system, look no further than Git or Mercurial extensions from the Visual Studio Extension Library. : I would now strongly encourage you to use over , or . Take a look at [Try GitHub](https://docs.github.com/en/get-started/quickstart/set-up-git) in the browser to see how awesome it is! - [Getting Started with Git on Visual Studio 2012](https://web.archive.org/web/20160129184401/http://blogs.msdn.com:80/b/visualstudioalm/archive/2013/01/30/getting-started-with-git-in-visual-studio-and-team-foundation-service.aspx) - in-depth tutorial by .- [Visual Studio Tools for Git](https://marketplace.visualstudio.com/items?itemName=TFSPowerToolsTeam.VisualStudioToolsforGit) - An extension for Team Explorer to provide source control integration for Git. Enables integration with local Git repositories and provides tools to work with remote repositories. ![enter image description here](https://i.stack.imgur.com/4r9KC.png)
Source control in Visual Studio 2010?
CC BY-SA 4.0
0
2010-07-14T08:02:50.023
2023-01-03T11:09:50.730
2023-01-03T11:08:20.277
4,751,173
274,117
[ "visual-studio-2010", "git", "version-control", "visual-studio-2012", "visual-sourcesafe" ]
3,244,407
1
null
null
1
1,147
I want to use the Eclipse which uses to , but some of my properties are multi line (e.g. Description). Problem: ![alt text](https://3.bp.blogspot.com/_hsp14iFkRLs/Sg28gW12WnI/AAAAAAAADk4/Y_bxy5lHIvI/s320/PinActionRemoved.png) I tried using WrapTextPropertyDescriptor instead of TextPropertyDescriptor, but it doesn't seem to help.
Eclipse PropertySheetPage - Can it support a multi line property?
CC BY-SA 2.5
null
2010-07-14T08:17:13.897
2012-11-17T18:03:25.313
2017-02-08T14:28:29.257
-1
11,710
[ "java", "eclipse", "view", "properties", "line" ]
3,246,717
1
null
null
1
58
Currently i'm having a problem. I want to access the data available in the 4th table of my DB. Db image: ![enter image description here](https://i.stack.imgur.com/j1mhr.png) I have the tables in this way: Categories --> Categories_Companies --> Companies --> Affiliates Like it shows in the image i'm on the categories and in the Categories view (views/categories/view.ctp) i want to show the fields title and url from the affiliates table. There is another way of doing that without using the this->query? Regards
How to the data available in a 4th column in cakephp?
CC BY-SA 3.0
null
2010-07-14T13:45:40.730
2013-04-18T09:53:22.980
2013-04-18T09:53:22.980
664,177
391,388
[ "php", "mysql", "cakephp", "frameworks" ]
3,247,065
1
3,247,242
null
4
1,688
I am trying to do the design of a [Bejeweled](http://en.wikipedia.org/wiki/Bejeweled) game. I have basically 3 classes. The `Game` class, which is what is going to be used by the player, a `Board` class, that represents the board, and a `SwitchController` class that is responsible for checking if the wanted switch on the board is valid, making the switch, counting the number of possible switches available (so I can know when the game is over, etc). My current design is something like the following: ``` Game: isGameOver() isSwitchValid(coord1, coord2) makeSwitch(coord1, coord2) getPieceAt(coord) getBoardLength() IBoard: getPieceAt(coord) setPieceAt(coord, piece) getLength() ``` My idea would then to have a `ISwitchController`: ``` ISwitchController: isSwitchValid(coord1, coord2) makeSwitch(coord1, coord2) getAllValidSwitches() ``` Here is a little diagram of how the classes are to be organized: ![alt text](https://yuml.me/diagram/scruffy/class/%5BGame%5D-%3E%5BISwitchController%5D,%20%5BISwitchController%5D-%3E%5BIBoard%5D,%20%5BGame%5D-%3E%5BIBoard%5D) I would have 2 different concrete classes of `IBoard` available for use (and for each one of them, I'd have to have an `ISwitchController` implementation). ## The problem: My program is to have 2 IBoard implementations: The first, `ArrayBoard`, will have all the pieces of the board stored in a 2D Array. There is nothing special about it. I will define an `ArrayBoardSwitchController` for managing this class. The second, `ListBoard`, will have for each color of pieces, a List/Set with all the coordinates of the pieces of that color. I will define a `ListBoardSwitchController` for managing this class. The main issue here is that the implementation of `SwitchController` will be totally different on `ArrayBoard` and on `ListBoard`. For example, while for implementing `getAllValidSwitches()` `ArrayBoardSwitchController` only needs the `getPieceAt()` method, that would not be a good idea to do with `ListBoardSwitchController`(in that class I use internally lists because it's easier to check if the move is valid that way). From what I can see, there are 2 different possible solutions: 1. I could either merge together the ISwitchController and IBoard interfaces. That way I'd only have two classes, Game and Board (while basically Game would just be a controller for the Board, as it would be the Board that had all the game logic). It wouldn't be that nice because the classes wouldn't be as cohese as they could be if I had 3 distinct classes. 2. Let the interfaces as they are and put all the methods I need to work with public in the concrete classes. For example, if I need a getYellowPiecesList() method, I'd put it public on ListBoard so ListBoardSwitchController could use it. ListBoardSwitchController would only know about it because it knows it only works against ListBoards. What's your opinion on the matter?
Problems designing Bejeweled game
CC BY-SA 2.5
null
2010-07-14T14:23:11.467
2010-07-14T22:59:04.800
2017-02-08T14:28:29.590
-1
130,758
[ "c#", "java", "oop" ]
3,248,106
1
3,252,420
null
3
21,811
I'm coding a tab system for my website that must be entirely CSS/HTML/JS (without using any images). Problem is, I keep hacking the code until when I'm finished its just a mess. I don't know whether to use positioning, or float the tabs or what. Basically one of the big problems is that after I take away the bottom-border CSS of the selected tab, I need to move it down 1px so it seamlessly blends with the sorting headers - I don't know whether to use margin: -1px or position: relative/absolute etc. I'd love some advice on a good way to code a tab system like this, so that it can be reused across the website! ![alt text](https://i.imgur.com/mWo9W.gif)
Best way to code an HTML/CSS/JS tab navigation system (no images)
CC BY-SA 2.5
null
2010-07-14T16:02:03.067
2010-07-15T11:13:14.597
null
null
364,969
[ "javascript", "html", "css", "xhtml", "tabs" ]
3,248,569
1
3,248,623
null
0
194
I am puzzled by why it does not retrieve the data and keep saying i have a error "InvalidCastException", i am currently doing these in compact framework and is totally new to it, i searched around looking for a way to get data into a listview base on what little i know about java . these are my creation of table and inserting during formload ``` Dim createTable3 As SqlCeCommand = connection.CreateCommand createTable3.CommandText = "CREATE TABLE product(product_id int IDENTITY(0,1) PRIMARY KEY,product_name nvarchar(50),bought_price float,sales_price float)" connection.Open() createTable3.ExecuteNonQuery() Dim insertCmd2 As SqlCeCommand = connection.CreateCommand insertCmd2.CommandText = "INSERT INTO product(product_name,bought_price)Values('Food',1.00)" insertCmd2.ExecuteNonQuery() Dim insertCmd3 As SqlCeCommand = connection.CreateCommand insertCmd3.CommandText = "INSERT INTO product(product_name,bought_price)Values('Orange',1.50)" insertCmd3.ExecuteNonQuery() Dim insertCmd4 As SqlCeCommand = connection.CreateCommand insertCmd4.CommandText = "INSERT INTO product(product_name,bought_price)Values('Apple',3.00)" insertCmd4.ExecuteNonQuery() Dim insertCmd5 As SqlCeCommand = connection.CreateCommand insertCmd5.CommandText = "INSERT INTO product(product_name,bought_price)Values('Fruit',2.00)" insertCmd5.ExecuteNonQuery() connection.Close() ``` this is a code for a get info button ``` Dim itmListItem As ListViewItem Dim shtFieldCntr As Short Dim loopCmd As SqlCeCommand = connection.CreateCommand loopCmd.CommandText = "SELECT * FROM product" connection.Open() Dim dr As SqlCeDataReader = loopCmd.ExecuteReader Do While dr.Read itmListItem = New ListViewItem() If dr.IsDBNull(dr(0)) Then itmListItem.Text = "" Else itmListItem.Text = dr(0) End If For shtFieldCntr = 1 To dr.FieldCount() If dr.IsDBNull(shtFieldCntr) Then itmListItem.SubItems.Add("") Else itmListItem.SubItems.Add(dr.GetString(shtFieldCntr)) ' error this line End If Next shtFieldCntr lvProduct.Items.Add(itmListItem) Loop connection.Close() ``` picture ![alt text](https://imgur.com/FVWxj.jpg)
Conversion error in vb.net?
CC BY-SA 2.5
null
2010-07-14T17:00:42.787
2010-07-14T17:43:02.997
2010-07-14T17:43:02.997
267,738
267,738
[ "vb.net", "visual-studio-2005", "compact-framework" ]
3,249,062
1
3,250,250
null
5
8,814
I'm using the `listings` package for syntax highlighting, set up with the following arguments: ``` \lstset{ language=Java, captionpos=b, tabsize=3, frame=lines, numbers=left, numberstyle=\tiny, numbersep=5pt, breaklines=true, showstringspaces=false, basicstyle=\footnotesize, identifierstyle=\color{magenta}, keywordstyle=\bfseries, commentstyle=\color{darkgreen}, stringstyle=\color{red} } ``` This works fairly well, resulting in: ![(screenshot 1 of resulting document)](https://imgur.com/u52L3.png) ![(screenshot 2 of resulting document)](https://imgur.com/qCkG1.png) What I would like, is that the constants `MIN_PIXELS` and `MAX_PROCESSING_TIME` are styled in a different color, and the class names `Rectangle`, `Bitmap`, etc. are styled in yet another color. It would also be nice if I could get numbers colored, but that's not my main focus. Is there any way to do this?
LaTeX listings package: different style for constants/classes/variables
CC BY-SA 2.5
null
2010-07-14T18:06:40.713
2010-07-15T07:18:48.117
null
null
154,306
[ "latex", "package", "tex", "listings" ]
3,250,744
1
3,557,579
null
6
2,781
I have an image with and have a few values to make it a perspective in Silverlight, but can't quite figure out what I need to do mathmatically to make it happen. The most important thing is I have an angle called a "Field of View" (). This is the normal picture: ![normal](https://lh6.ggpht.com/_vm4C26HAULw/TDqpHdeCOeI/AAAAAAAAAIc/v1xFSjibQvI/s128/normal.jpg) For example: ![](https://lh5.ggpht.com/_vm4C26HAULw/TD4loFCiFmI/AAAAAAAAAIw/zieJBjwmYJk/s128/x30perspective30.jpg)![](https://lh5.ggpht.com/_vm4C26HAULw/TD4lov80VpI/AAAAAAAAAI0/Df55ts6KIGo/s128/x30perspective60.jpg)![](https://lh4.ggpht.com/_vm4C26HAULw/TD4lo5UWiPI/AAAAAAAAAI4/mDDroMB0o60/s128/x30perspective120.jpg)![](https://lh4.ggpht.com/_vm4C26HAULw/TD4lnwn6HuI/AAAAAAAAAIs/uQjFPQnk3t0/s128/x60perspective30.jpg)![](https://lh6.ggpht.com/_vm4C26HAULw/TD4lnGzPaDI/AAAAAAAAAIk/fEoVp55Wc0c/s128/x60perspective60.jpg)![](https://lh4.ggpht.com/_vm4C26HAULw/TD4lniWrzfI/AAAAAAAAAIo/tJtim0gs7rs/s128/x60perspective120.jpg) Any help would be appreciated to walk me through the math to reproduce these in Silverlight.
How to Set this Kind of Perspective Transform in Matrix3D?
CC BY-SA 2.5
0
2010-07-14T21:37:38.677
2010-08-26T15:36:07.973
2017-02-08T14:28:32.043
-1
149,573
[ ".net", "silverlight", "image", "matrix", "gdi+" ]
3,251,700
1
3,252,317
null
1
345
In VS2008 Team System how do I select some Code Analysis rules? The window is empty. ![alt text](https://farm5.static.flickr.com/4077/4795107164_373a078b71.jpg) When I build, there is the error: ``` CA0053 : * Failed to load rules file '\rules': Unable to find the specified file. ``` Obviously this means the rules file isn't found and that is the problem. What is the remedy? In other words, how do I use the project page properties to create a rules file?
How to configure VSTS2008 Code Analysis?
CC BY-SA 2.5
null
2010-07-15T00:50:55.710
2010-07-15T03:47:31.263
2017-02-08T14:28:32.380
-1
90,837
[ "visual-studio-2008", "configuration", "code-analysis" ]
3,252,382
1
3,261,091
null
1
4,089
I have a <select> element that I dynamically populate with different values at runtime. I use the code below to clear the <option> elements and then reload it with new ones. It works in Firefox 3.6.6 and Chrome 5.0. ``` function loadPickerFromObject(pickerControl, values) { pickerControl.empty(); for (var nameProperty in values) { if (!$.isFunction(values[nameProperty])) { var option = $("<option></option>") .text(values[nameProperty]) .attr("value", nameProperty) .appendTo(pickerControl); } } } ``` (I'm not fond of writing javascript and try to stay away from it, if there is a better way of dynamically populating a <select> element from the properties of an object please show how) It doesn't work in IE 8. When I debug using Visual Studio I can see that the new items were loaded correctly, but when I check the page they're not updated and display the old items. ![alt text](https://farm5.static.flickr.com/4101/4795662114_60ef957f08.jpg) ![alt text](https://farm5.static.flickr.com/4082/4795029523_0cae54c3d2.jpg) What's up with that? It should display the elements displayed in the Text Visualizer window (first screenshot). Why is it not showing the new values?
Why does dynamically populating a select drop down list element using javascript not work in IE?
CC BY-SA 2.5
null
2010-07-15T04:07:56.697
2011-03-08T11:15:09.503
2017-02-08T14:28:33.077
-1
80,282
[ "javascript", "jquery", "select", "internet-explorer-8" ]
3,252,717
1
null
null
5
1,318
I have a grid of 3D terrain, where each of the coordinate `(x,y,z)` of each grid are known. Now, I have a monotonously increasing/ decreasing line, which its start point is also known. I want to find the point where the terrain and the line meets. What is the algorithm to do it? ![](https://docs.google.com/drawings/pub?id=1_ntJWYbHpQfVvVSRYGC6dAb8DC-4SydzcqQQwA5Zgek&w=960&h=720) What I can think of is to store the coordinate of the 3D terrain in a `nxn` matrix. And then I would segmentize the line based on the grid in the terrain. I would then start with the grid that is the nearest to the line, and then try to compute whether that plane intersects with the line, if yes, then get the coordinate and exit. If no, then I would proceed to the next segment. But is my algorithm the best, or the most optimum solution? Or is there any existing libraries that already do this?
On a 3D Terrain, Given a 3D Line, Find the Intersection Point Between the Line and the Terrain
CC BY-SA 2.5
0
2010-07-15T05:33:11.280
2010-07-16T06:03:23.730
2017-02-09T15:09:21.050
-1
3,834
[ "c#", "graphics" ]
3,254,437
1
3,255,574
null
1
139
Visual Studio 2008 breaks at the following line with the following message: ![VisualStudio8Debugger](https://wiki.mcneel.com/_media/people/weirddebuggerbehaviour.png) I don't want it to stop there, it's making debugging a nightmare. Somehow the exception thrown at line 998 is causing this, even though there is a try...catch block somewhere up there that is supposed to catch this exception. Any ideas on how to stop this from happening?
VS2008 debugger breaks at unwanted line
CC BY-SA 2.5
null
2010-07-15T09:57:22.063
2010-07-15T12:47:42.713
2017-02-08T14:28:34.437
-1
81,947
[ "visual-studio-2008", "debugging", "exception", "breakpoints" ]
3,255,698
1
3,256,051
null
0
5,266
What's the best way to implement an Android Market-like tabbar (Apps/Games/Downloads)? ![alt text](https://farm4.static.flickr.com/3505/3967919035_ec51923ac2.jpg) It would be great if I could use TabHost, but I believe it doesn't allow this level of customization.
Android Market-like tabbar
CC BY-SA 2.5
0
2010-07-15T12:59:13.290
2011-11-22T12:20:32.330
2017-02-08T14:28:35.473
-1
143,378
[ "android", "tabbar", "android-tabhost" ]
3,256,420
1
3,265,031
null
7
18,286
I'm trying to get the output from a servlet on an Android phone. This is my servlet: ``` /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package main; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author Bert Verhelst <[email protected]> */ public class servlet1 extends HttpServlet { /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head>"); out.println("<title>Servlet servlet1</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>processing...</h1>"); out.println("</body>"); out.println("</html>"); } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); PrintWriter out = response.getWriter(); out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " + "Transitional//EN\">\n" + "<html>\n" + "<head><title>Hello WWW</title></head>\n" + "<body>\n" + "<h1>doget...</h1>\n" + "</body></html>"); } /** * Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); PrintWriter out = response.getWriter(); out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " + "Transitional//EN\">\n" + "<html>\n" + "<head><title>Hello WWW</title></head>\n" + "<body>\n" + "<h1>dopost...</h1>\n" + "</body></html>"); } /** * Returns a short description of the servlet. * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> } ``` This is my Android main page: ``` package be.smarttelecom.MyTest; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView output = (TextView) findViewById(R.id.output); try { output.append("starting\n"); RestClient client = new RestClient("http://10.0.0.188:8084/Servlet_1/servlet1"); try { client.Execute(RequestMethod.GET); } catch (Exception e) { e.printStackTrace(); } output.append("after execute\n"); String response = client.getResponse(); output.append("class - " + response + "\n" ); output.append(response); output.append("done\n"); } catch (Exception ex) { output.append("error: " + ex.getMessage() + "\n" + ex.toString() + "\n"); } } } ``` And finally we have the RestClient: ``` package be.smarttelecom.MyTest; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.protocol.HTTP; public class RestClient { private ArrayList <NameValuePair> params; private ArrayList <NameValuePair> headers; private String url; private int responseCode; private String message; private String response; public String getResponse() { return response; } public String getErrorMessage() { return message; } public int getResponseCode() { return responseCode; } public RestClient(String url) { this.url = url; params = new ArrayList<NameValuePair>(); headers = new ArrayList<NameValuePair>(); } public void AddParam(String name, String value) { params.add(new BasicNameValuePair(name, value)); } public void AddHeader(String name, String value) { headers.add(new BasicNameValuePair(name, value)); } public void Execute(RequestMethod method) throws Exception { switch(method) { case GET: { //add parameters String combinedParams = ""; if(!params.isEmpty()){ combinedParams += "?"; for(NameValuePair p : params) { String paramString = p.getName() + "=" + p.getValue(); if(combinedParams.length() > 1) { combinedParams += "&" + paramString; } else { combinedParams += paramString; } } } HttpGet request = new HttpGet(url + combinedParams); //add headers for(NameValuePair h : headers) { request.addHeader(h.getName(), h.getValue()); } executeRequest(request, url); break; } case POST: { HttpPost request = new HttpPost(url); //add headers for(NameValuePair h : headers) { request.addHeader(h.getName(), h.getValue()); } if(!params.isEmpty()){ request.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8)); } executeRequest(request, url); break; } } } private void executeRequest(HttpUriRequest request, String url) { HttpClient client = new DefaultHttpClient(); HttpResponse httpResponse; try { httpResponse = client.execute(request); responseCode = httpResponse.getStatusLine().getStatusCode(); message = httpResponse.getStatusLine().getReasonPhrase(); HttpEntity entity = httpResponse.getEntity(); if (entity != null) { InputStream instream = entity.getContent(); response = convertStreamToString(instream); // Closing the input stream will trigger connection release instream.close(); } } catch (ClientProtocolException e) { client.getConnectionManager().shutdown(); e.printStackTrace(); } catch (IOException e) { client.getConnectionManager().shutdown(); e.printStackTrace(); } } private static String convertStreamToString(InputStream is) { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } } catch (IOException e) { e.printStackTrace(); } finally { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } return sb.toString(); } } ``` Unfortunately this doesn't work. Here is what I get for output (null), ![Screenshot of ](https://i.stack.imgur.com/KFo82.png) What am I doing wrong? I request the DoGet method of my servlet and convert the output to a string, but it appears to be empty. I allowed the Internet connection in the manifest file just after the closing bracket of application, ``` <uses-permission android:name="android.permission.INTERNET" /> ```
Call Java servlet from Android
CC BY-SA 3.0
0
2010-07-15T14:18:44.203
2018-02-13T06:06:04.083
2011-12-30T10:12:46.273
63,550
373,207
[ "java", "android", "servlets", "httpclient" ]
3,256,639
1
null
null
3
2,952
We've got a surprisingly complex workflow that needs to be monitored by a quasi-technical employees with an in-house webapp. There's about 30 steps, some of which are manual (editing), some are semi-automated stop points (like "the files have been received" or customer approval of certain templates), and some are completely automated (file conversion, search indexing, etc). The flowchart for all of these steps is large and complicated, and three people might be working on three completely different steps at any one time. How would you present this vast amount of information as usefully as possible to your users? Just showing the whole diagram seems like the brute force solution. But it's big, and it'll likely get bigger as we do more things. Not to mention the complexity necessary to encode this entire diagram in HTML. ![alt text](https://i.imgur.com/0ZHro.png)
Designing a complex workflow diagram
CC BY-SA 2.5
0
2010-07-15T14:39:18.727
2010-09-03T12:51:45.323
2010-07-15T14:46:40.600
53,060
53,060
[ "user-interface", "flowchart" ]
3,257,204
1
3,258,948
null
3
597
Say I want to animate a ball rolling 1000 pixels to the right, specifying a timing function in the process – something like this: ``` UIView *ball = [[UIView alloc] initWithFrame:CGRectMake(0,0,30,30)]; CABasicAnimation* anim = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"]; anim.toValue = [NSNumber numberWithFloat:ball.frame.origin.x + 1000.0]; // move 1000 pixels to the right anim.duration = 10.0; anim.timingFunction = [CAMediaTimingFunction functionWithControlPoints: 0.1 :0.0 :0.3 :1.0]; // accelerate fast, decelerate slowly [ball.layer addAnimation:anim forKey:@"myMoveRightAnim"]; ``` is to have a method, say `-(void)animationProgressCallback:(float)progress`, be called during the animation, in regular intervals of the animation's progress , i.e. ignoring the timing function. I'll try to explain with the above example with the ball rolling 1000px to the right (charted by the y axis, in our case 100%=1000px): ![alt text](https://dl.dropbox.com/u/7493953/AnimationProgressCallback.png) I want my callback method to be invoked whenever the ball has progressed 250 pixels. Because of the timing function, the first 250 pixels might be reached in ti=2 seconds, half the total distance reached just ti= 0.7 seconds later (fast acceleration kicks in), the 750px mark another ti= 1.1 seconds later, and needing the remaining ti= 5.2 seconds to reach the 100% (1000px) mark. If the animation called a delegate method in animation-progress intervals as described, I wouldn't need to ask this question… ;-) One solution I can think of is to calculate the bezier curve's values, map that to the ti values (we know the total animation duration), and when the animation is started, we sequentially perform our `animationProgresssCallback:` selector with those delays manually. Obviously, this is insane (calculating bezier curves manually??) and, more importantly, unreliable (we can't rely on the animation thread and the main thread to be in sync – or can we?). Looking forward to your ideas!
CAAnimation that calls a method in periodic animation-progress intervals?
CC BY-SA 2.5
null
2010-07-15T15:37:56.620
2010-07-15T18:58:29.157
2020-06-20T09:12:55.060
-1
45,018
[ "cocoa", "core-animation", "progress" ]
3,258,146
1
3,258,211
null
2
5,495
I have data in data table like below. ![alt text](https://i700.photobucket.com/albums/ww5/vsrikanth/graphdata.jpg) I am trying to make graph like below using asp.net chart control (made graph in excel with some test data) ![alt text](https://i700.photobucket.com/albums/ww5/vsrikanth/graph.jpg) points are X and Y values. lines are linear, exponential, logarithmic and power values. So how can I make this chart in asp.net (vb.net or c#)? I am newbie to chart control. thank you
Line and Points using asp.net chart control
CC BY-SA 2.5
null
2010-07-15T17:16:56.113
2010-07-15T17:27:36.307
2017-02-08T14:28:36.507
-1
158,008
[ "c#", "asp.net", "vb.net", "charts" ]
3,258,136
1
3,258,196
null
7
1,742
In my latest ASP.NET MVC 2 application I have been trying to put into practice the concepts of [Domain Driven Design (DDD)](http://en.wikipedia.org/wiki/Domain-driven_design), the [Single Responsibility Principle (SRP)](http://en.wikipedia.org/wiki/Single_responsibility_principle), [Inversion of Control (IoC)](http://devlicio.us/blogs/billy_mccafferty/archive/2009/11/09/dependency-injection-101.aspx), and [Test Driven Development (TDD)](http://en.wikipedia.org/wiki/Test_driven_development). As an architecture example I have been following Jeffery Palermo's "[Onion Architecture](http://jeffreypalermo.com/blog/the-onion-architecture-part-1/)" which is expanded on greatly in [ASP.NET MVC 2 in Action](https://rads.stackoverflow.com/amzn/click/com/193518279X). ![Onion Architecture Diagram](https://i.stack.imgur.com/7pmUF.png) While, I have begun to successfully apply most (some?) of these principles I am missing a key piece of the puzzle. I am having trouble determining the best mechanism for auto-wiring a service layer to my domain entities. As an example: each domain entity that needs the ability to send an email should depend on an `IEmailService` interface. From my reading, best practice to reveal this dependency would be to use constructor injection. In my UI layer I perform a similar injection for repository interface implementations using the `StructureMapControllerFactory` from [ASP.NET MVC Contrib](http://mvccontrib.codeplex.com/). Where I am confused is what is the best mechanism for auto-wiring the injection of the necessary services into domain entities? Should the domain entities even be injected this way? How would I go about using `IEmailService` if I don't inject it into the domain entities? Additional Stack Overflow questions which are great DDD, SRP, IoC, TDD references: - [IoC Containers and Domain Driven Design](https://stackoverflow.com/q/1752228/61654)- [How to avoid having very large objects with Domain Driven Design](https://stackoverflow.com/q/2896848/61654)
Options for IoC Auto Wiring in Domain Driven Design
CC BY-SA 3.0
0
2010-07-15T17:14:58.770
2013-10-24T19:27:39.393
2017-05-23T12:30:39.447
-1
61,654
[ "c#", "domain-driven-design", "inversion-of-control", "ioc-container", "autowired" ]
3,258,163
1
3,258,231
null
5
763
I'm making a program that displays some info in ncurses, and then opens vim (using `system`) to allow the user to edit a file. After vim is exited, though, the ncurses screen won't redraw. `refresh` and `wrefresh` don't do anything, resulting in the complete trashing of my beautiful menu. So, I get sent back to the command line. The menu items redraw when I move to them. Moving around a bit results in something that looks like this: ![Tragedy](https://imgur.com/xYqU2.png) As you can see, I no longer am in my pretty ncurses environment,. I could tear down ncurses completely and set things up again, but then some stuff (like menu position) is not preserved. How do I do this correctly? Is there a better way to call some external program and return here gracefully?
C - going from ncurses ui to external program and back
CC BY-SA 2.5
null
2010-07-15T17:19:29.230
2010-07-15T17:30:59.050
null
null
219,604
[ "c", "ncurses", "external-process" ]
3,260,204
1
null
null
0
525
Ordered list - html : How to make point(ol{style-list:disc;}) position in midde height of image? - ![](https://t2.gstatic.com/images?q=tbn:MezWc3ku_XBiwM:http://www.whereisacar.com/images/cars/bill-gates-car.jpg) - ![](https://t0.gstatic.com/images?q=tbn:98OwBE0-icyCNM:http://www.comparecheapinsurance.com/car-insurance/images/car-insurance-policy.jpg) --- ``` <ol style="style-list:disc;"> <li><img src="https://t2.gstatic.com/images?q=tbn:MezWc3ku_XBiwM:http://www.whereisacar.com/images/cars/bill-gates-car.jpg"></li> <li><img src="https://t0.gstatic.com/images?q=tbn:98OwBE0-icyCNM:http://www.comparecheapinsurance.com/car-insurance/images/car-insurance-policy.jpg"></li> </ol> ``` I am looking for the way without use background point image, if this option exist
Ordered list - html : How to make point(ol{style-list:disc;}) position in midde height of image?
CC BY-SA 3.0
null
2010-07-15T21:23:14.893
2012-02-26T21:06:20.070
2017-02-08T14:28:37.880
-1
342,984
[ "html", "css", "html-lists" ]
3,260,392
1
3,260,436
null
18
26,721
Looking for the easist/most scalable way to do a set "difference" in SQL Server see below. ![alt text](https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Venn0110.svg/384px-Venn0110.svg.png) If you can't tell from the picture i am looking for everything that is not in the intersection. I have seen one way to do it: ``` select * from ( (select 'test1' as a, 1 as b) union all (select 'test2' as a , 2 as b union all select 'test1' as a , 1 as b ) )un group by a,b having count(1)=1 ``` But i fear what would happen if i used two large sets (i will not be querying from select '' constant statements, my queries will be pulling from real tables.) Possible solution... ``` drop table #temp_a; drop table #temp_b; go select * into #temp_a from ( select 1 as num, 'String' as two, 'int'as three, 'purple' as four union all select 2 as num, 'dog' as two, 'int'as three, 'purple' as four union all select 3 as num, 'dog' as two, 'int'as three, 'cat' as four ) a select * into #temp_b from ( select 1 as num, 'String' as two, 'decimal'as three, 'purple' as four union all select 2 as num, 'dog' as two, 'int'as three, 'purple' as four union all select 3 as num, 'dog' as two, 'int'as three, 'dog' as four ) b SELECT IsNull(a.num, b.num) A,IsNull(a.two, b.two) B, IsNull(a.three, b.three) C, IsNull(a.four, b.four) D FROM #temp_a a FULL OUTER JOIN #temp_b b ON (a.num=b.num AND a.two=b.two and a.three=b.three and a.four=b.four) WHERE (a.num is null or b.num is null ) ``` RESULTS: > 1 String int purple3 dog int cat1 String dec purple3 dog int dog
SQL Server Difference (opposite of intersect)
CC BY-SA 2.5
0
2010-07-15T21:53:13.150
2012-11-08T09:47:59.223
2020-06-20T09:12:55.060
-1
256,793
[ "sql-server", "sql-server-2008" ]
3,263,227
1
3,263,253
null
0
951
This a screenshot from a Tkinter Listbox in a program I'm writing: ![Screenshot of the problem](https://content.screencast.com/users/jeff2342/folders/Jing/media/4c796049-0a0a-42f6-9357-262160661c12/00000001.png) Why does the `\t` character show up as a black bar? On a Mac it shows up normally (as a tab), but on Windows I get this. I think it might have something to do with character encoding because strings are unicode by default in OS X but not Windows? I tried writing the tab as `chr(9)` instead of `\t`, but it didn't help.
Python: Why does the tab character show up weird in Tkinter?
CC BY-SA 2.5
null
2010-07-16T08:42:46.367
2010-07-16T08:49:24.403
2017-02-08T14:28:39.930
-1
429,898
[ "python", "character-encoding", "special-characters", "tkinter" ]
3,265,986
1
3,279,877
null
98
16,673
This problem actually deals with roll-overs, I'll just generalized below as such: I have a 2D view, and I have a number of rectangles within an area on the screen. How do I spread out those boxes such that they don't overlap each other, but only adjust them with minimal moving? The rectangles' positions are dynamic and dependent on user's input, so their positions could be anywhere. Attached![alt text](https://i.stack.imgur.com/3LVLK.jpg) images show the problem and desired solution The real life problem deals with rollovers, actually. Answers to the questions in the comments 1. Size of rectangles is not fixed, and is dependent on the length of the text in the rollover 2. About screen size, right now I think it's better to assume that the size of the screen is enough for the rectangles. If there is too many rectangles and the algo produces no solution, then I just have to tweak the content. 3. The requirement to 'move minimally' is more for asethetics than an absolute engineering requirement. One could space out two rectangles by adding a vast distance between them, but it won't look good as part of the GUI. The idea is to get the rollover/rectangle as close as to its source (which I will then connect to the source with a black line). So either 'moving just one for x' or 'moving both for half x' is fine.
An algorithm to space out overlapping rectangles?
CC BY-SA 4.0
0
2010-07-16T14:40:29.400
2019-05-29T10:20:19.610
2019-05-29T10:20:19.610
1,481,116
128,585
[ "algorithm", "user-interface", "language-agnostic", "graphics" ]
3,266,578
1
3,267,658
null
2
425
I'm trying to make a table view with an appearance much like the default Weather application provided by Apple. However I'm struggling a bit to make the table cells look correctly. I would like all the cells, except the first one to be deletable. The problem is that the default cells have the small delete button on the left side of the cell instead of inside the cell. This causes the cells to shrink to the right, except the first one which keeps its size since it's not deletable. ![alt text](https://www.infinite-loop.dk/img/LocationDelete.png) ![alt text](https://www.infinite-loop.dk/img/WeatherApp.png) So my question is if there is any way to tweak the default UITableViewCell to have the same behavior as the cell used in the Weather app? Or do I have to implement my own cell with button animation, etc, etc?
Appearance of table cells when deleting
CC BY-SA 2.5
null
2010-07-16T15:44:56.307
2015-07-08T21:47:50.300
2017-02-08T14:28:41.300
-1
293,024
[ "iphone", "uitableview" ]
3,267,285
1
null
null
0
807
If, for example, I have the following requirements: 1. Dog is an Animal 2. Zoo has Animal(s) Do I still need the 2nd diamond connector (the lower one) as shown here: ![diagram image](https://i.stack.imgur.com/RYYuM.png)
Does the Derived class need diamond link?
CC BY-SA 3.0
null
2010-07-16T17:09:56.817
2013-06-13T22:24:40.170
2013-06-13T22:12:04.313
320,111
387,474
[ "inheritance", "uml", "composition", "aggregation", "diagrams" ]
3,268,118
1
null
null
1
3,506
How can I create graphs like this.. ![alt text](https://i.imgur.com/03LZA.png) ``` <?= format_size($this->space_used); ?> out of <?= format_size($this->total_space); ?> ```
creating bar graph in php
CC BY-SA 2.5
null
2010-07-16T19:16:39.473
2012-05-01T10:40:07.780
2012-05-01T10:40:07.780
1,292,730
393,796
[ "php", "bar-chart" ]
3,269,806
1
3,269,869
null
4
1,512
I have 3d mesh and I would like to draw each face a 2d shape. What I have in mind is this: for each face 1. access the face normal 2. get a rotation matrix from the normal vector 3. multiply each vertex to the rotation matrix to get the vertices in a '2d like ' plane 4. get 2 coordinates from the transformed vertices I don't know if this is the best way to do this, so any suggestion is welcome. At the moment I'm trying to get a rotation matrix from the normal vector, how would I do this ? Here is a visual explanation of what I need: ![3d to 2d](https://i984.photobucket.com/albums/ae330/orgicus/cube.gif) At the moment I have quads, but there's no problem converting them into triangles. I want to rotate the vertices of a face, so that one of the dimensions gets flattened. I also need to store the original 3d rotation of the face. I imagine that would be inverse rotation of the face normal. I think I'm a bit lost in space :) Here's a basic prototype I did using [Processing](http://processing.org): ``` void setup(){ size(400,400,P3D); background(255); stroke(0,0,120); smooth(); fill(0,120,0); PVector x = new PVector(1,0,0); PVector y = new PVector(0,1,0); PVector z = new PVector(0,0,1); PVector n = new PVector(0.378521084785,0.925412774086,0.0180059205741);//normal PVector p0 = new PVector(0.372828125954,-0.178844243288,1.35241031647); PVector p1 = new PVector(-1.25476706028,0.505195975304,0.412718296051); PVector p2 = new PVector(-0.372828245163,0.178844287992,-1.35241031647); PVector p3 = new PVector(1.2547672987,-0.505196034908,-0.412717700005); PVector[] face = {p0,p1,p2,p3}; PVector[] face2d = new PVector[4]; PVector nr = PVector.add(n,new PVector());//clone normal float rx = degrees(acos(n.dot(x)));//angle between normal and x axis float ry = degrees(acos(n.dot(y)));//angle between normal and y axis float rz = degrees(acos(n.dot(z)));//angle between normal and z axis PMatrix3D r = new PMatrix3D(); //is this ok, or should I drop the builtin function, and add //the rotations manually r.rotateX(rx); r.rotateY(ry); r.rotateZ(rz); print("original: ");println(face); for(int i = 0 ; i < 4; i++){ PVector rv = new PVector(); PVector rn = new PVector(); r.mult(face[i],rv); r.mult(nr,rn); face2d[i] = PVector.add(face[i],rv); } print("rotated: ");println(face2d); //draw float scale = 100.0; translate(width * .5,height * .5);//move to centre, Processing has 0,0 = Top,Lef beginShape(QUADS); for(int i = 0 ; i < 4; i++){ vertex(face2d[i].x * scale,face2d[i].y * scale,face2d[i].z * scale); } endShape(); line(0,0,0,nr.x*scale,nr.y*scale,nr.z*scale); //what do I do with this ? float c = cos(0), s = sin(0); float x2 = n.x*n.x,y2 = n.y*n.y,z2 = n.z*n.z; PMatrix3D m = new PMatrix3D(x2+(1-x2)*c, n.x*n.y*(1-c)-n.z*s, n.x*n.z*(1-c)+n.y*s, 0, n.x*n.y*(1-c)+n.z*s,y2+(1-y2)*c,n.y*n.z*(1-c)-n.x*s,0, n.x*n.y*(1-c)-n.y*s,n.x*n.z*(1-c)+n.x*s,z2-(1-z2)*c,0, 0,0,0,1); } ``` Sorry if I'm getting annoying, but I don't seem to get it. Here's a bit of python using [Blender](http://www.blender.org/documentation/249PythonDoc/Mathutils-module.html)'s API: ``` import Blender from Blender import * import math from math import sin,cos,radians,degrees def getRotMatrix(n): c = cos(0) s = sin(0) x2 = n.x*n.x y2 = n.y*n.y z2 = n.z*n.z l1 = x2+(1-x2)*c, n.x*n.y*(1-c)+n.z*s, n.x*n.y*(1-c)-n.y*s l2 = n.x*n.y*(1-c)-n.z*s,y2+(1-y2)*c,n.x*n.z*(1-c)+n.x*s l3 = n.x*n.z*(1-c)+n.y*s,n.y*n.z*(1-c)-n.x*s,z2-(1-z2)*c m = Mathutils.Matrix(l1,l2,l3) return m scn = Scene.GetCurrent() ob = scn.objects.active.getData(mesh=True)#access mesh out = ob.name+'\n' #face0 f = ob.faces[0] n = f.v[0].no out += 'face: ' + str(f)+'\n' out += 'normal: ' + str(n)+'\n' m = getRotMatrix(n) m.invert() rvs = [] for v in range(0,len(f.v)): out += 'original vertex'+str(v)+': ' + str(f.v[v].co) + '\n' rvs.append(m*f.v[v].co) out += '\n' for v in range(0,len(rvs)): out += 'original vertex'+str(v)+': ' + str(rvs[v]) + '\n' f = open('out.txt','w') f.write(out) f.close ``` All I do is get the current object, access the first face, get the normal, get the vertices, calculate the rotation matrix, invert it, then multiply it by each vertex. Finally I write a simple output. Here's the output for a default plane for which I rotated all the vertices manually by 30 degrees: ``` Plane.008 face: [MFace (0 3 2 1) 0] normal: [0.000000, -0.499985, 0.866024](vector) original vertex0: [1.000000, 0.866025, 0.500000](vector) original vertex1: [-1.000000, 0.866026, 0.500000](vector) original vertex2: [-1.000000, -0.866025, -0.500000](vector) original vertex3: [1.000000, -0.866025, -0.500000](vector) rotated vertex0: [1.000000, 0.866025, 1.000011](vector) rotated vertex1: [-1.000000, 0.866026, 1.000012](vector) rotated vertex2: [-1.000000, -0.866025, -1.000012](vector) rotated vertex3: [1.000000, -0.866025, -1.000012](vector) ``` Here's the first face of the famous Suzanne mesh: ``` Suzanne.001 face: [MFace (46 0 2 44) 0] normal: [0.987976, -0.010102, 0.154088](vector) original vertex0: [0.468750, 0.242188, 0.757813](vector) original vertex1: [0.437500, 0.164063, 0.765625](vector) original vertex2: [0.500000, 0.093750, 0.687500](vector) original vertex3: [0.562500, 0.242188, 0.671875](vector) rotated vertex0: [0.468750, 0.242188, -0.795592](vector) rotated vertex1: [0.437500, 0.164063, -0.803794](vector) rotated vertex2: [0.500000, 0.093750, -0.721774](vector) rotated vertex3: [0.562500, 0.242188, -0.705370](vector) ``` The vertices from the Plane.008 mesh are altered, the ones from Suzanne.001's mesh aren't. Shouldn't they ? Should I expect to get zeroes on one axis ? Once I got the rotation matrix from the normal vector, what is the rotation on x,y,z ? 1. Blender's Matrix supports the * operator 2.In Blender's coordinate system Z point's up. It looks like a right handed system, rotated 90 degrees on X. Thanks
draw 3d faces as 2d
CC BY-SA 2.5
0
2010-07-17T01:17:19.417
2010-07-18T23:37:37.043
2017-02-08T14:28:41.980
-1
89,766
[ "math", "opengl", "3d", "vector", "matrix" ]
3,270,209
1
3,442,396
null
16
47,047
I put in a partially transparent PNG image in Tkinter and all I get is this ![alt text](https://i.stack.imgur.com/CHyXq.png) How do I make the dark triangle on the right clear? (like it's supposed to be) This is python 2.6 on Windows 7, btw.
How do I make Tkinter support PNG transparency?
CC BY-SA 4.0
0
2010-07-17T04:05:23.080
2022-02-15T18:51:12.853
2019-09-09T09:16:56.803
918,959
433,417
[ "python", "png", "transparency", "tkinter" ]
3,270,372
1
4,743,364
null
2
5,903
im using report viewer in visual studio 2008, in my report, everything is display correctly except table. check the image for more details ![http://i26.tinypic.com/2luq3rc.jpg](https://i.stack.imgur.com/VNUPD.jpg) the table is left aligned, how do i center align it please help
how to center align table in reportview in asp.net
CC BY-SA 3.0
null
2010-07-17T05:24:59.427
2012-08-13T09:44:13.080
2012-08-13T09:44:13.080
1,573,667
336,009
[ "report", "viewer" ]
3,270,717
1
3,270,765
null
2
3,891
I am using SQL Server 2008 express, any reason?? however, if i convert to decimal(6,4) is work. e.g. Select CONVERT(decimal(6,4),'1.1234'); thanks you. ![alt text](https://imgur.com/8pggu.png)
SQL Server 2008 cannot define decimal type with 4 decimal places?
CC BY-SA 2.5
null
2010-07-17T08:07:16.367
2010-07-17T09:26:12.637
2010-07-17T09:26:12.637
27,535
83,952
[ "sql", "sql-server" ]
3,270,840
1
null
null
10
9,354
Is there anyway that allows me to find all the intersection points between a line and a grid? ( The intersection circles are not drawn to scale with each other, I know) ![](https://docs.google.com/drawings/pub?id=1UzRWHH8tbGtNMltEy-LUkroKPKUHvU0Nrja1uBIGPMw&w=960&h=720) A brute force way is to compute very intersection for the `x-y` grid with the line, but this algorithm is awfully inefficient (`O(m*n)`, where `m` is the number of `x` grid and `n` is the number of `y` grid). I'm looking for a better algorithm on this.
Find the intersection between line and grid in a fast manner
CC BY-SA 4.0
0
2010-07-17T08:45:31.527
2022-03-11T03:07:47.630
2020-04-29T06:55:41.717
3,834
3,834
[ "c#", "geometry" ]
3,271,815
1
3,271,834
null
0
85
Can anybody tell me what program is this? ![Mystery App](https://i.stack.imgur.com/JeK3A.png) Is this for memory measurement or what?
Question about program
CC BY-SA 3.0
null
2010-07-17T14:13:59.217
2011-07-14T08:17:44.530
2011-07-14T08:17:44.530
21,234
null
[ "debugging", "memory-management" ]
3,272,532
1
3,272,787
null
3
2,807
I'm making [an overloaded TableLayoutPanel which draws some fancy borders](https://stackoverflow.com/questions/3265202/how-do-i-make-an-custom-drawn-resizable-container), but for some reason the call to `Graphics::DrawImage` isn't working as expected. It seems to fade out my 1x10 pixel source image when I stretch it: ![alt text](https://i765.photobucket.com/albums/xx291/JonCage1/StretchNotWorking.png) This is the function which does the rendering: ``` void GTableLayoutPanel::RenderSides(Graphics^ g, array<Drawing::Image^>^ sideImages) { if( sideImages ) { if( sideImages->Length < 4 ) { throw gcnew System::ArgumentException(String::Format("Not enough images supplied to render sides (expected 4 but only got {0})", sideImages->Length)); } int borderSize = sideImages[0]->Height; g->DrawImage(sideImages[0], Rectangle(borderSize, 0, this->Width-borderSize*2, borderSize)); g->DrawImage(sideImages[1], Rectangle(this->Width-borderSize, borderSize, borderSize, this->Height-borderSize*2)); g->DrawImage(sideImages[2], Rectangle(borderSize, this->Height-borderSize, this->Width-borderSize*2, borderSize)); g->DrawImage(sideImages[3], Rectangle(0, borderSize, borderSize, this->Height-borderSize*2)); } } ```
Why doesn't Graphics::DrawImage stretch images as expected?
CC BY-SA 2.5
null
2010-07-17T17:27:54.280
2010-07-17T18:44:54.713
2017-05-23T12:01:33.300
-1
15,369
[ ".net", "windows", "winforms", "c++-cli", "drawimage" ]
3,272,618
1
4,993,182
null
0
1,195
I'm using the following 9 patch image as the row background in a list view. [alt text http://img39.imageshack.us/img39/9346/rowbackground9.png](http://img39.imageshack.us/img39/9346/rowbackground9.png) (the image is right above this line, in case you missed it) I've placed this image in drawable-hdpi. When I run the app in a high density device, the grey border appears only while scrolling, and disappears when the list view is still. Why is this? The goal is to have a row divider like the Android Market app. ![alt text](https://farm4.static.flickr.com/3505/3967919035_ec51923ac2.jpg)
9 patch row background appears irregularly in Android
CC BY-SA 2.5
null
2010-07-17T17:54:21.457
2012-05-06T16:49:49.690
2017-02-08T14:28:35.473
-1
143,378
[ "android", "nine-patch" ]
3,273,067
1
3,290,271
null
2
1,878
I've declared a Telerik `RadRibbonBar` in my application, but the title window's text is white, and looks like this: ![alt text](https://imgur.com/5NL7L.png) In my opinion, it looks pretty bad. Does anyone know of any way to change it? This is the XAML I'm using: ``` <telerikRibbon:RadRibbonWindow x:Class="TestApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikRibbon="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar" Height="300" Width="300"> <DockPanel LastChildFill="True"> <telerikRibbon:RadRibbonBar ApplicationName="This text is white and looks awful." DockPanel.Dock="Top" Focusable="False"> <telerikRibbon:RadRibbonBar.ApplicationMenu> <telerikRibbon:ApplicationMenu> <telerikRibbon:RadRibbonButton Text="New"/> </telerikRibbon:ApplicationMenu> </telerikRibbon:RadRibbonBar.ApplicationMenu> <telerikRibbon:RadRibbonTab Header="Home"> </telerikRibbon:RadRibbonTab> </telerikRibbon:RadRibbonBar> <Grid DockPanel.Dock="Bottom" Background="White"> </Grid> </DockPanel> </telerikRibbon:RadRibbonWindow> ```
How can I change the color of a (Telerik) RadRibbonBar's title text?
CC BY-SA 2.5
null
2010-07-17T20:04:19.267
2010-07-20T13:14:13.050
null
null
18,505
[ "wpf", "telerik-radribbonbar" ]
3,273,732
1
3,274,281
null
2
2,284
How do you remove the dotted line around the currently selected tab on a JTabbedPane. For example: ![alt text](https://i.imgur.com/Ui5o4.png) See the dotted line around it?
Remove the JTabbedPane "currently selected" dotted line
CC BY-SA 2.5
0
2010-07-17T23:56:34.790
2010-07-18T04:16:25.863
null
null
null
[ "java", "swing", "jtabbedpane" ]
3,274,186
1
3,274,328
null
1
666
How would I go about making the length of the tabs automatically resize based on how much room is left in that row of tabs. Picture: ![alt text](https://i.imgur.com/9t12T.png) As you can see the tab's width is based off the text in the tab. If you need me to explain what I want better then just ask me because I don't know if I made it clear enough.
Centering the JTabbedPane but not the actual tabs
CC BY-SA 2.5
null
2010-07-18T03:20:31.453
2010-07-18T14:24:27.597
null
null
null
[ "java", "swing", "jtabbedpane" ]
3,275,250
1
3,278,596
null
3
669
My little game project is a physics based platform jobbie created with Chipmunk (via SpaceManager) in Cocos2d. I wanted something a little different to the a-typical tile mapped level design, so I'm creating levels as SVG files in Illustrator, which I then parse to create the landscape, platforms, spawn points etc etc. It's working pretty well and I feel like I can be as creative as I want with the level design this way. However, this approach only creates the chipmunk bodies and shapes so far. It doesn't help me when it comes to creating graphics for things like the landscape. So to illustrate what I'm talking about, a basic level would look a little something like this (scaled down) [alt text http://www.tomelders.com/bin/leveleg.jpg](http://www.tomelders.com/bin/leveleg.jpg) The grey areas would represent the landscape. My first thought was to trace over these levels in Photoshop, and slice them up into 512x512 pngs, which could then be laid on on top of the physics layer. But that instinctively sounds like a very inefficient way to go. the guys behind Rolando have taken a super simple approach which works well for them [alt text http://www.handcircus.com/wp-content/uploads/2008/06/rolando_screen_b.jpg](http://www.handcircus.com/wp-content/uploads/2008/06/rolando_screen_b.jpg) But I would like a bit more detail in my levels, almost similar to what they've achieved in MX Mayhem ![alt text](https://ipadapplications.files.wordpress.com/2010/03/77cb8902ed26.jpeg) Which the more I look at, thew more I'm convinced that they're using the first approach I mentioned of laying large images over the top of everything. So, my question is, does anyone have any tips or insight into what sort of stuff I should be exploring or reading up on to accomplish this sort of stuff. Up to now, my only experience with creating level graphics in Cocos2d has been with TMXTileMaps. I'm still new to game development so perhaps there's some jargon and terminology to describe what I'm aiming for that I just don't know yet. Any help or advice is greatly appreciated. PS: I know question within questions are bad form but it makes sense here: What's the math behind memory usage? Is there a formula I can use to figure out the memory usage of my graphics up front.
I need a strategy for developing graphics for a Cocos2d-iPhone project
CC BY-SA 2.5
0
2010-07-18T11:01:50.023
2011-03-11T13:42:50.653
2017-02-08T14:28:47.227
-1
64,586
[ "graphics", "cocos2d-iphone" ]
3,276,733
1
4,368,392
null
2
1,107
I have a drawing procedure (it works) it draws to a bitmap "OBJmap" it then puts OBJmap into Wholemap. This all works but there is a issue. It seems to treat the undefined parts of objmap as white even though objmap and wholemap is set as PF32Bit, and hence when it puts objmap into wholemap I get a white box behind the pasted image that should be transparent. This only happens on ATI machines, but this is for schools and they all have 100% ati because they are cheap (im not biased honest), so I was recommended to use AggPas to solve this issue. ``` procedure DrawScene(); var ObjLength,LineLength,Filllength,Obj,lin,angle,i,x1,y1,x2,y2:integer; Npoints : array[0..1] of Tpoint; WG,OG: Tagg2d; Objmap,wholemap:TBitmap; begin //Set up WholeMap Bitmap wholemap := TBitmap.Create; wholemap.PixelFormat:=pf32bit; wholemap.Transparent:=false; wholemap.Width:=area; wholemap.height:=area; WG:= Tagg2d.create; BitmapAlphaTransparency(wholemap, 0); WG.attach(wholemap,False); WG.ClearAll(255,0,0,255); //BitmapAlphaTransparency(wholemap, 255); //WG.MasterAlpha(255); // itterate through each object drawing the object to OBJmap ObjLength:=length(Objects); for Obj:=0 to (ObjLength-1) do if objects[Obj].Visible then begin //Set up Object map Bitmap Objmap := TBitmap.Create; Objmap.PixelFormat:=pf32bit; Objmap.Transparent:=true; Objmap.Width:=Objects[obj].Boundright-objects[obj].Boundleft+3; Objmap.height:=Objects[obj].BoundTop-objects[obj].Boundbottom+3; OG:= Tagg2d.create; OG.attach(Objmap,False); {OG.ClearAll(0,0,255,255); // Clears all bitmap to transparrent OG.MasterAlpha(255); OG.LineWidth(5); og.AntiAliasGamma(255); OG. OG.LineColor(0,255,0,255); OG.FillColor(0,255,0,255); //OG. OG.MoveTo(0,0); OG.LineTo(Objmap.width-1,Objmap.height-1); } //Draw the Lines to Objmap LineLength:=length(objects[Obj].Lines)-1; angle:=objects[Obj].Rotation; for lin:=0 to (LineLength) do begin //Transform points for i:=0 to 1 do Npoints[i] := PointAddition(RotatePoint(objects[obj].Lines[lin].Point[i],angle),point(-objects[obj].boundleft,-Objects[obj].Boundbottom),false); //draw transformed points Objmap:=DrawLine(Npoints[0].x,Npoints[0].y,Npoints[1].x,Npoints[1].y,objects[obj].Lines[lin].Color,Objmap,OG); end; //Draw the Fills to Objmap Filllength:=length(objects[Obj].Fills)-1; for i:=0 to Filllength do begin //transform points Npoints[0]:=PointAddition(RotatePoint(objects[Obj].Fills[i].Point,objects[Obj].Rotation),point(-objects[obj].boundleft,-Objects[obj].Boundbottom),false); // fill points Objmap:=fillpoint( Npoints[0].x, Npoints[0].y,objects[Obj].Fills[i].color,Objmap); end; //draw objmap to wholemap x1:=objects[obj].Position.x+objects[obj].Boundleft-1; y1:=area-(objects[obj].Position.y+objects[obj].Boundtop)-2; x2:=x1+Objmap.Width; y2:=y1+Objmap.Height; WG.TransformImage(Objmap,x1,y1,x2,y2); //this show border //WG.copyimage(Objmap,x1,y1); //this draws the scene up but does not handle transparencies correctly //wholemap.Canvas.Draw(x1,y1,Objmap);//does not work in PF32bit or on ati machines //wg.Free; // this it does not like (crash) do i need it? Objmap.Free; end; // write wholemap to Visible Canvas mainwindow.bufferim.Canvas.Draw(0,0,wholemap); wholemap.Free; mainwindow.RobotArea.Picture.Graphic:=mainwindow.bufferim.Picture.Graphic; end; ``` Not working ,Working and ,current respectivly ![alt text](https://i44.photobucket.com/albums/f14/keahicheveyo/notworking.jpg) ![alt text](https://i44.photobucket.com/albums/f14/keahicheveyo/working.jpg) ![alt text](https://i44.photobucket.com/albums/f14/keahicheveyo/outside.jpg) I am only able to get working result on Nvidia machines with the default ``` wholemap.Canvas.Draw ``` Method and I wish to get it to work on all machines using aggpass. What do I do how do I draw objmap onto wholemap but not draw the transparent bits?
AggPas Delphi Drawing Transparencies
CC BY-SA 2.5
null
2010-07-18T18:33:47.543
2011-03-24T10:20:14.607
2017-02-08T14:28:49.037
-1
53,915
[ "delphi", "graphics", "bitmap", "drawing", "transparency" ]
3,277,141
1
3,277,189
null
1
1,028
Im getting the error: > You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10', '16:39:02', '292.35')' at line 1 this is the query im running in php: ``` mysql_query("INSERT INTO `copper` (`month`, `time`, `price`) VALUES ('$month', '$time', '$price')") or die(mysql_error()); ``` Here is a literal example: ``` INSERT INTO `table` (`month`, `time`, `price`) VALUES ('10', '16:39:02', '292.35') ``` this is my table setup ![alt text](https://i.imgur.com/pETxW.jpg)
mysql syntax error inserting decimal, timestamp with php
CC BY-SA 3.0
null
2010-07-18T20:29:12.533
2013-05-07T00:45:57.130
2013-05-07T00:45:57.130
815,073
115,949
[ "php", "mysql", "mysql-error-1064" ]
3,278,270
1
null
null
0
762
![menu sample](https://i.stack.imgur.com/ngOtf.png) I have an accordion menu that currently expands and collapses all with the same container of the menu system boundaries. My question is, (see menu sample), how can I take the sub-menu of my accordion menu, i.e. the expanded bit, that currently shows "Pool & Spa Maintenance" in the attached example and have it display as a sub-menu container to the right of its parent "Pool & Spa"? It's almost like a z-index where I want the sub-menu to overlap the parent menu container but all still be part of the same menu system. How can I achieve this?
Accordion menu/sub-menu offset
CC BY-SA 4.0
null
2010-07-19T03:22:33.437
2019-08-17T10:19:01.253
2019-08-17T10:19:01.253
472,495
111,479
[ "jquery", "html", "css" ]
3,279,488
1
3,293,921
null
1
447
i just created a subclass of uitableviewcell and used it in my cellforrowatindexpath. after adding a simple uilabel my cell looks currently something like this: ![alt text](https://dl.getdropbox.com/u/6357394/Bildschirmfoto%202010-07-19%20um%2010.28.26.png) my aim is to style the cell like ![alt text](https://dl.getdropbox.com/u/6357394/Bildschirmfoto%202010-07-19%20um%2010.27.49.png) but how to do that? first i thougt about simply adding a uiimageview and sending it to back with the rounded corners and the arrow in it. but in real this are three different types of a cell. one for top, one for the middle part, one for the bottom part of a section. any hints how to handle this three "custom" cells in one subclass of uitableviewcell? thanks for all tips! choise // if anything is unclear, leave a comment! ;)
UITableViewCell subclassed - background for specific position
CC BY-SA 2.5
0
2010-07-19T08:33:05.757
2010-07-22T14:50:29.100
2017-02-08T14:28:49.713
-1
253,288
[ "iphone", "objective-c", "uitableview" ]
3,279,904
1
null
null
1
651
I have a file that is being included, in that file there's Server.MapPath('../_data") which doesn't work since that file included is not in the same Server.MapPath as the file executed. any Idea of how I can get the included file's path? To clarify the situation, I added a picture ![alt text](https://imgur.com/Ues2e.png) As you can see, I'm including a file from one site to the other (no other choice there), so that the server.mappath is intended to be different, though the result is that on the included file I get the mappath of the executed file.
get path to an included file on Classic ASP?
CC BY-SA 2.5
null
2010-07-19T09:38:16.403
2010-07-19T10:38:58.447
2010-07-19T10:38:58.447
333,283
333,283
[ "asp-classic", "path" ]
3,279,950
1
3,280,250
null
4
341
I am having problem finding a memory leak with Instruments. Usually it helps me a lot and I am able to find the leak, but in this case I'm lost. I am creating a view controller that controls a views loaded from NIB file. The view has Map View with "Show user location" on true. Once user location is found I use MKReverseGeocoder to get the location data. The leak is always present when I load this view controller and MapKit finds user location. I figured out that MKReverseGeocoder isn't problem here, since I get the same leak with or without the MKReverseGeocoder. When I load this view Instruments "leaks" report a memory leak. See the screenshot on the image: ![alt text](https://dl.dropbox.com/u/1207859/leak.png) This is how I initialize my controller: ``` AddPlaceViewController *addPlaceVC = [[AddPlaceViewController alloc] initWithNibName:@"AddPlaceViewController" bundle:[NSBundle mainBundle]]; addPlaceVC.delegate = self; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addPlaceVC]; self.placeController = navigationController; [self presentModalViewController:self.placeController animated:YES]; [addPlaceVC release]; [navigationController release]; ``` This is all on the iPhone Simulator 4 and targeted OS 3.2. Is this actually leak or what I am facing here?
tracing a memory leak with Instruments in iPhone app
CC BY-SA 2.5
0
2010-07-19T09:44:24.597
2010-07-19T10:31:10.460
2017-02-08T14:28:50.053
-1
255,710
[ "iphone", "memory-management", "memory-leaks" ]
3,281,685
1
3,288,440
null
14
3,684
I'm developing an application for Google App Engine which uses BigTable for its datastore. It's an application about writing a story collaboratively. It's a very simple hobby project that I'm working on just for fun. It's open source and you can see it here: [http://story.multifarce.com/](http://story.multifarce.com/) The idea is that anyone can write a paragraph, which then needs to be validated by two other people. A story can also be branched at any paragraph, so that another version of the story can continue in another direction. Imagine the following tree structure: ![](https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Binary_tree.svg/220px-Binary_tree.svg.png) Every number would be a paragraph. I want to be able to select all the paragraphs in every unique story line. Basically, those unique story lines are (2, 7, 2); (2, 7, 6, 5); (2, 7, 6, 11) and (2, 5, 9, 4). Ignore that the node "2" appears twice, I just took a tree structure diagram from Wikipedia. I also made a diagram of a proposed solution: [https://docs.google.com/drawings/edit?id=1fdUISIjGVBvIKMSCjtE4xFNZxiE08AoqvJSLQbxN6pc&hl=en](https://docs.google.com/drawings/edit?id=1fdUISIjGVBvIKMSCjtE4xFNZxiE08AoqvJSLQbxN6pc&hl=en) How can I set up a structure is performance efficient both for writing, but most importantly for reading?
Tree structures in a nosql database
CC BY-SA 2.5
0
2010-07-19T13:56:55.020
2010-07-21T21:31:57.273
2017-02-08T14:28:50.387
-1
119,081
[ "google-app-engine", "google-cloud-datastore", "nosql", "bigtable" ]
3,282,021
1
null
null
4
233
I'm wondering what UI library is used on the images below (it's from CityEngine). Does anyone know other UI libraries with similar capabilities (free floating, connected nodes with arbitrary UI elements)? I think it might be a part of Eclipse/JFace/SWT toolkit. ![alt text](https://content.screencast.com/users/zbychs/folders/Jing/media/a2137b75-7af2-4e1c-a408-39071a4b75b4/NodeUI.png) or: ![alt text](https://content.screencast.com/users/zbychs/folders/Jing/media/dbcb83dc-ea08-41a6-8e1c-741c62775456/UI.jpg)
What UI is used on this pictures? (node based ui)
CC BY-SA 2.5
null
2010-07-19T14:32:35.980
2012-09-13T11:12:08.073
2017-02-08T14:28:51.080
-1
395,913
[ "eclipse", "user-interface", "swt" ]
3,282,411
1
3,283,534
null
3
907
I'm writing a simple web report with a simple layout for internal use. The layout consists in a header on top and a content below, usually a table and a little more (very simple). My problem is that when the table is larger than the browser's viewport, the layout messes up: the header is wide as the viewport and not as the page `body` so when I scroll right it goes off screen, an the right border of the table is stuck against the viewport right side even though I a margin for the body. The HTML code of a clean test page is (number of `tr` elements reduced for lightness): ``` <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <link type="text/css" rel="stylesheet" href="style.css"> <title>Test page</title> </head> <body> <h1> Test page </h1> <div class="body" id="body"> <p> This is a test page.</p> <table class="shiny_table"> <thead> <tr> <th> 0 </th> <th> 1 </th> <th> 2 </th> <th> 3 </th> <th> 4 </th> <th> 5 </th> <th> 6 </th> <th> 7 </th> <th> 8 </th> <th> 9 </th> </tr> </thead> <tbody> <tr> <td> 0.9721986181295992 </td> <td> 0.6041465194175369 </td> <td> 0.5777094598685739 </td> <td> 0.9741661116808004 </td> <td> 0.8224265079662112 </td> <td> 0.7236314528096713 </td> <td> 0.24133248609797375 </td> <td> 0.8836446393181888 </td> <td> 0.02439762941899959 </td> <td> 0.8171104825665716 </td> </tr> </tbody> </table> </div> </body> </html> ``` The content of `style.css` is: ``` * { font-family: Verdana, Arial, Sans Serif; font-size: 10pt; } html, body { margin: 0pt; padding: 0pt; } body { background-color: rgb(192, 255, 192); } h1 { margin: 0pt; padding: 10pt; font-size: 20pt; background-color: rgb(192, 192, 255); text-align: center; text-transform: uppercase; } .body { margin: 10pt; } .shiny_table, .shiny_table th, .shiny_table td { border: solid 1pt rgb(192, 192, 192); border-collapse: collapse; } .shiny_table th, .shiny_table td { padding: 5pt; } ``` This is how it shows in Mozilla Firefox 3.6.6 (Internet Explorer 8.0.6001.18702 has the same problem): ![enter image description here](https://i.stack.imgur.com/ubg2n.png) ![enter image description here](https://i.stack.imgur.com/qeRT2.png) ![enter image description here](https://i.stack.imgur.com/9AuuW.png) How can I have the header right (have the background colour stretch to the right while the text is centered in the "first" viewport", stay fixed without moving, other pretty ideas), and have the table's right border spaced from the page's border? Thanks in advance, Andrea.
CSS issue with header and missing right space between table and page's border
CC BY-SA 3.0
0
2010-07-19T15:22:46.837
2013-02-21T07:16:38.360
2013-02-21T07:16:38.360
1,581,050
91,696
[ "html", "css", "layout" ]
3,282,935
1
null
null
22
21,985
I'm interested in drawing a [treemap](http://en.wikipedia.org/wiki/Treemapping): ![treemap example](https://i.stack.imgur.com/4wb1q.png) What is the easiest way to make one in Python? Is there a library that could produce such a graphic, given the proper input data?
Treemap visualization in Python
CC BY-SA 3.0
0
2010-07-19T16:26:02.787
2020-04-24T12:56:55.967
2012-03-25T23:44:30.063
2,683
396,007
[ "python", "data-visualization", "treemap" ]
3,284,111
1
3,284,299
null
10
9,948
In my iPad app Viewfinder ([iTunes Link](http://itunes.apple.com/gb/app/viewfinder-photo-search-download/id379028031?mt=8)), I'm trying to recreate the look of a UISegmentedControl as seen in the footer of Keynote's Build In popover: [](https://i.stack.imgur.com/o31oG.png) The iPad HIG suggests using a bottom-aligned UIToolbar, but the appearance is incorrect. This screenshot shows Black Opaque, but none of the standard styles match Keynote. ![Viewfinder](https://s3.amazonaws.com/ember/FpAKdML5qg1ZwvrScYICGk1dDTei76WY_o.png) Any advice on recreating the Keynote look would be appreciated. If you don't have Keynote on the iPad, you can see the same technique in the footer of the Bookmarks popover in Maps.
Using a UISegmentedControl in the footer of UIPopoverController
CC BY-SA 4.0
0
2010-07-19T19:01:01.713
2019-08-03T01:06:45.200
2019-08-03T01:06:45.200
4,751,173
96,455
[ "iphone", "ipad", "uisegmentedcontrol", "uipopovercontroller", "hig" ]
3,284,326
1
3,342,550
null
9
6,405
![An image clarifying things](https://imgur.com/7LOn5.png) How do I change the vertical alignment of the text in a CTFramesetter frame? I want my text to be in the middle instead of being at the . I am using Core Text framework. There is a setting of the paragraph to change horizontal aligment but not vertical.
Vertical align with Core Text?
CC BY-SA 2.5
0
2010-07-19T19:28:52.710
2013-12-10T17:00:07.263
2011-02-09T19:30:31.393
30,461
160,868
[ "alignment", "core-text" ]
3,285,349
1
3,286,226
null
0
1,497
the problem is that I first have to convert the two-dim to a one-dim, then find the selected index and then convert again and then save the new index. after that I have to use the right string.format to show the right output.. I'm just confused =( In the program there are two text boxes that ask for "row" and "col" size and then you press the button and a list box shows ``` ............................................................................................................................... Row...Col....................................................................................................................................... 1------1----Vacant ........................................................................ 1......2.......Vacant................................................................................................... 1......3.......Vacant.................................................................................................................................... 2------1----Vacant......................................................................................................................... 2......2.......Vacant.................................................................................................................................... 2......3.......Vacant.......................................................................................................................................................... 3------1----Vacant.................................................................................................................................... etc............................................................................................................................................................. ``` and when I double click one line it has to say "Reserved" Can someone help me what to do this please? This is my project folder so far here you can see my [failed code](http://www.mediafire.com/?o6ol8crpx7x9rno) and [this is my assignment](http://www.mediafire.com/?vfr3bvfyk673bmd) This is how the program is supposed to look like in the end ![http://i29.tinypic.com/risq6r.jpg](https://i.stack.imgur.com/xILHD.jpg) ``` 'Created by: Hans Elias Juneby 'Started: July 10, 2010 Completed July 0, 2010 Public Class MainFrame '''<summary> ''' Enum used for choices of showing results ''' </summary> '''<remarks></remarks> Private Enum UpdateOptions ShowAllSeats 'reserved and vacant seats ShowOnlyVacantSeats 'Only vacant seats ShowOnlyReservedSeats 'Only reserved seats End Enum 'Instance variables Private bookingObj As SeatBooking = New SeatBooking() Private showOptions As UpdateOptions = UpdateOptions.ShowAllSeats '''<summary> ''' Default constructor ''' Initialize components and do other preparations. ''' This method is called automatically before the form is made visible ''' </summary> ''' <remarks></remarks> Public Sub New() ' This call is required by the Windows Form Designer. InitializeComponent() ' My initialization InitializeControlvalues() UpdateResults() End Sub '''<summary> ''' Organize initiations ''' Fill comboboxes with options (strings), set default values, etc ''' </summary> '''<remarks></remarks> Private Sub InitializeControlvalues() FillUnitTypeList() lstUnits.SelectedIndex = -1 cmbShowOptions.Items.AddRange([Enum].GetNames(GetType(UpdateOptions))) cmbShowOptions.SelectedIndex = 0 rbtnLetters.Checked = True ' txtNumOfSeats.Text = bookingObj.GetMaxCols.ToString() 'default values ' txtNumOfRows.Text = bookingObj.GetMaxRows.ToString() 'default values lblNumVacants.Text = String.Empty 'default values lblTotal.Text = String.Empty 'default values lblPercent.Text = String.Empty 'default values End Sub ''' <summary> ''' Clear listbox, format new strings with the help of the bookingObj and '''fill in the box. ''' </summary> ''' <remarks></remarks> Private Sub UpdateResults() End Sub '''<summary> ''' Helper function that returns a string containing a string "** Reserved **" or '''"Vacant" or no text according the value in showOptions. THe UpdateResults ''' calls this function in detecting which string to show in the listbox ''' </summary> ''' <param name="row">Input</param> ''' <param name="col">Input</param> ''' <returns>A formatted string as explained above</returns> '''<remarks></remarks> Private Function GetReservationStatusString() Select Case (cmbShowOptions.SelectedIndex) Case 0 Case 1 Case 2 End Select End Function 'Fills values in the combobox Private Sub FillUnitTypeList() Dim units As String() = {"Bus Seats", "Train Seats", "Plane Seats"} cmbUnitType.Items.AddRange(units) cmbUnitType.SelectedIndex = 0 End Sub Private Sub cmbShowOptions_SelectedIndexChange(ByVal sender As System.Object, ByVal e As System.GC) showOptions = DirectCast(cmbShowOptions.SelectedIndex, UpdateOptions) UpdateResults() End Sub Private Sub btnMatrix_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMatrix.Click Dim SeatBooking As New SeatBooking bookingObj.GetMaxRows.ToString() bookingObj.GetMaxCols.ToString() lblTotal.Text = txtNumOfRows.Text * txtNumOfSeats.Text End Sub ''' <summary> ''' Event-handler for the double-click event. ''' Reserve/cancel the seat chosen in the listbox (call bookingObj.SetRowAndCOlumnValue), ''' only if the showOption is Show ALL; otherwise, give an error message and do nothing. ''' </summary> ''' <param name="sender">sender-object from the caller</param> ''' <param name="e">EventArgs object from the caller</param> ''' <remarks></remarks> Private Sub lstUnits_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstUnits.DoubleClick lblNumVacants.Text = lblTotal.Text - 1 Return End Sub ''' <summary> ''' Event-handler method for change in the radiobutton ''' </summary> ''' <param name="sender"></param> ''' <param name="e"></param> ''' <remarks></remarks> Private Sub rbtnLetters_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtnLetters.CheckedChanged UpdateResults() Dim A As Integer = 65 Dim myChar As Char Dim col As Integer = 0 myChar = Convert.ToChar((A + col)) End Sub Private Sub UpdateUnit() 'Dim strText As String = bookingObj.GetUnitName(cmbUnitType.SelectedIndex) ' lblVacantUnits.Text End Sub End Class ``` then the SeatBook class: ``` 'Created by: Hans Elias Juneby 'Started: July 10, 2010 Completed July 0, 2010 Public Class SeatBooking Private array As Double() 'Declaration of the array Private lastIndex As Integer = 0 'last filled position (lastIndex+1 = number of items '''<summary> ''' Create (or recreate) the matrix with the given size ''' </summary> '''<param name="rowSize">Number of rows</param> ''' <param name="colSize">Number of columns</param> '''<remarks></remarks> Public Sub CreateArray(ByVal rowSize As Integer, ByVal colSize As Integer) Debug.Assert(rowSize >= 0) 'Program execution halts here in case size is <0; array = New Double(rowSize - 1) {} Debug.Assert(colSize >= 0) 'Program execution halts here in case size is <0; array = New Double(colSize - 1) {} Dim seatMatrix As Boolean(,) seatMatrix = New Boolean(rowSize, colSize) {} End Sub '''<summary> ''' Calculate the total number of elements(row*col) ''' </summary> '''<returns>The total number of elements</returns> '''<remarks></remarks> Public Function GetMaxCount() As Integer End Function '''<summary> ''' Check if a seat in a specific row and column is reserved. ''' </summary> '''<param name="row">given row</param> '''<param name="col">given col</param> '''<returns>True if the seat is reserved and false otherwise</returns> '''<remarks></remarks> Public Function IsReserved(ByVal row As Integer, ByVal col As Integer) End Function '''<summary> ''' Make a new reservation or cancel an existing. This process is onde by ''' reversing the boolean value in the given position in the matrix, from true to ''' false (reverse the seat) or vice versa(Cancel the reservation) ''' </summary> '''<param name="row">given row</param> '''<param name="col">given col</param> '''<remarks></remarks> Public Sub Reserve(ByVal row As Integer, ByVal col As Integer) End Sub '''<summary> ''' Thenumber of rows in the Matrix ''' </summary> ''' <returns>The number of rows</returns> ''' <remarks></remarks> Public Function GetMaxRows() As Integer Dim colsize As Integer = MainFrame.txtNumOfSeats.Text Dim rowsize As Integer = MainFrame.txtNumOfRows.Text CreateArray(colsize, rowsize) For i As Integer = 0 To array.Length - 1 MainFrame.lstUnits.Items.Add("----" & i & "---" & GetMaxCols.ToString.Length) Next End Function '''<summary> ''' Thenumber of columns in the Matrix ''' </summary> ''' <returns>The number of columns</returns> ''' <remarks></remarks> Public Function GetMaxCols() As Integer Dim colsize As Integer = MainFrame.txtNumOfSeats.Text Dim rowsize As Integer = MainFrame.txtNumOfRows.Text CreateArray(rowsize, colsize) For h As Integer = 0 To array.Length - 1 Next End Function '''<summary> ''' The method first finds the first vacant pos in the matrix (row, col) ''' and then calls another method MatrixIndexToVectorialIndex that determines which ''' position the element has if the matrix was rolled out into a one-dimensional ''' array. In a 3x3 matrix, the element in position (1,1) has an index 4 in ''' one-dimensional array. The method is useful when updating the listbox in the ''' GUI which contains a one-dimensional array of strings. The method determines which ''' position (row,col) in the matrix corresponds to an item (row) in the listbox. ''' </summary> '''<returns>The index, considering the matrix as one long vector, to the first vacant ''' position ( the first False value). A value -1 is returned if no vacant element is ''' found</returns> '''<remarks></remarks> Public Function GetFirstVacantPosition() As Integer End Function ''' <summary> ''' Determine a corresponding index for an element at (row,col) in a one-dimensional ''' presentation of the matrix. Think of the matrix as beeing rolled out into a one-dim ''' array. In a 3x3 matrix, the element in position (1,1) has an index 4 in ''' one-dimensional array. ''' 20 11 22 ''' 33 41 55 ''' 60 7 99 Consider value (1,1)=41 ''' The above matrix can now be represented as one dimensional array. This makes it ''' easier to update the listbox in the GUI. ''' 20 11 22 33 41 55 60 7 99 value(4)=41 ''' Index 0 1 2 3 4 5 6 7 8 '''Hence, index (1,1) in the matrix corresponds to row 4 in the listbox (one-dim array) ''' </summary> ''' <param name="row"></param> ''' <param name="col"></param> ''' <returns>The new index as explained above</returns> ''' <remarks></remarks> Public Function MatrixIndexToVectorIndex(ByVal row As Integer, ByVal col As Integer) End Function ''' <summary> ''' Determines the index in the matrix (row,col) that corresponds to a given ''' index in a one-dim array (listbox). This method actually is reverse process of ''' the method MatrixIndexToVectorIndex (see above). The parameter row contains ''' the input, i.e. index of the element in a one-dim array. The results (row and col) ''' are saved and sent back to the caller via the ref variables row,col. ''' </summary> ''' <param name="row">Input and output parameter</param> ''' <param name="col">Output parameter</param> ''' <remarks></remarks> Public Sub VectorIndexToMatrixIndex(ByRef row As Integer, ByRef col As Integer) End Sub ''' <summary> ''' This function receives an index in a one-dim array (e.g. listbox) and calls ''' the method VectorIndexToMatrixIndex to fin the same position in the matrix. ''' It then calls the function Reserve to either reserve or cancel a booking. ''' (If False value is saved in the element, it reserves the seat by changing ''' the value to True, and vice-versa). ''' </summary> ''' <param name="oneDimListIndex"></param> ''' <remarks></remarks> Public Sub SetRowAndColumnValue(ByVal oneDimListIndex As Integer) End Sub ''' <summary> ''' Calculate the total number of the reserved seats, i.e. the total ''' number of the True values in the matrix. ''' </summary> ''' <returns>Number of reserved seats</returns> ''' <remarks></remarks> Public Function GetNumOfReservedSeats() As Integer End Function ''' <summary> ''' Calculate the total number of the vacant seats, i.e the total ''' number of the False values in the matrix. ''' </summary> ''' <returns>number of vacant seats</returns> ''' <remarks></remarks> Public Function GetNumOfVacantSeats() As Integer End Function ''' <summary> ''' Relation between the reserved seats and the total number of seats in percent. ''' </summary> ''' <returns>Percent of Reservation</returns> ''' <remarks></remarks> Public Function PercentOfReservation() As Double End Function End Class ```
How do I convert a two-dim array to a one-dim?
CC BY-SA 3.0
0
2010-07-19T21:44:42.460
2012-05-01T10:40:23.273
2012-05-01T10:40:23.273
588,306
396,252
[ "vb.net" ]
3,285,568
1
3,285,885
null
2
3,012
I have a web form with a dropdown list `<asp:dropdownlist>`, but for the sake of formatting I want the actual control (before you open the dropdown list) to be relatively narrow. When the user opens the contents of the dropdown, I want the actual list to appear wider than the control. Something like this: ![alt text](https://www.ibm.com/developerworks/rational/library/07/0206_bermingham/dw_ta_long.jpg) How can you achieve this functionality with ASP.NET webforms?
asp:dropdownlist width: How to make the control narrower than the dropdown list
CC BY-SA 2.5
0
2010-07-19T22:23:19.020
2010-07-20T11:25:20.770
2020-06-20T09:12:55.060
-1
116,810
[ "c#", "asp.net", "html" ]
3,286,503
1
3,287,467
null
0
714
this is my code : ``` <style type="text/css"> #draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; border:1px solid #DDDDDD; color:#333333; background:#F2F2F2; } #droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; border:1px solid #E78F08; color:#FFFFFF; font-weight:bold; background:#F6A828; } #droppable.highlight{ background:#FFE45C; } </style> <div class="demo" style="margin-left:35%;margin-top:10%;cursor:pointer;"> <div id="draggable"> <p>Drag me to my target</p> </div> <div id="droppable" > <p>Drop here</p> </div> </div><!-- End demo --> <script type="text/javascript" src="jquery-1.4.2.min.js"></script> <script type="text/javascript" src="jquery-ui-1.8rc3.custom.min.js"></script> <script type="text/javascript"> $(function() { $("#draggable").draggable(); $("#droppable").droppable({ drop: function(event, ui) { $(this).addClass('highlight').find('p').html('Dropped!'); $(this).append(ui.draggable.draggable( "destroy" )) } }); }); ``` i want to drag a div into another one and when i drag stoped , it show : ![](https://i.stack.imgur.com/YQhGC.png) this is not seem to "into" the droppable div , because the draggable div be added some css style automatically when use ".draggable()" ``` element.style { left:133px; position:relative; top:38px; } ``` i can clean the css , but does jquery-ui has a method to do this ?
how to clean the css style of jquery-ui be added automatically when someone use ".draggable()"
CC BY-SA 3.0
null
2010-07-20T02:09:26.843
2013-04-04T11:47:40.933
2013-04-04T11:47:40.933
569,101
234,322
[ "javascript", "css", "jquery-ui", "drag-and-drop" ]
3,287,318
1
3,287,343
null
1
100
i am on windows/apache/mysql/php setup. i have recently reinstalled PHP. but i found that it broke certian things. simple scripts like just `phpinfo()`, `echo`, simple OO class definitions etc works. but my Zend Framework app failed. same as the doctrine 2 sandbox i am working on. they both returned the ... below ... screen ![alt text](https://farm5.static.flickr.com/4115/4811557572_ba0f7bc669.jpg) i also noticed that if i accessed the zend framework app without `vhost` (`http://localhost/php/learningzf/public` vs `http://learningzf`), it works, except that css which points to the wrong place (server root) fails # UPDATE it seems to work again now. not sure why too
Some PHP (Zend Framework/Doctrine) fails after reinstalling PHP (on Windows/Apache)
CC BY-SA 2.5
null
2010-07-20T05:46:11.477
2011-01-21T21:52:09.630
2017-02-08T14:28:53.853
-1
292,291
[ "php", "apache" ]
3,287,753
1
3,294,609
null
1
881
I have a `UIWebView` that works fine for viewing an Word or Excel document stored in the app's local Documents folder. I can use either: ``` [webView loadData:documentData MIMEType:mimeType textEncodingName:textEncoding baseURL:baseDocumentURL]; ``` Or: ``` [webView loadRequest:[NSURLRequest requestWithURL:baseDocumentURL]]; ``` In both cases, `baseDocumentURL` is a `file://` URL pointed at a file in the app's local Documents folder. If I try to view an Word or Excel document — by either `-loadData:MIMEType:textEncodingName:baseURL:` or by `-loadRequest:` — my app throws an exception and crashes. If I view the document through a web server, via Mobile Safari, the Safari browser displays the following error message: ![alt text](https://farm5.static.flickr.com/4074/4811707482_95d5b2b8ab.jpg) My own `UIWebView` crashes while Mobile Safari works. What am I missing in setting up my web view that is causing an exception to be thrown?
How to properly deal with encrypted Word and Excel documents for viewing in a UIWebView?
CC BY-SA 2.5
0
2010-07-20T07:12:52.720
2015-02-24T21:27:39.987
2017-02-08T14:28:54.187
-1
19,410
[ "iphone", "excel", "uiwebview", "ms-word", "credentials" ]
3,290,036
1
3,290,351
null
10
13,453
is there any way to apply to a table cells' both the separate and the collapsed border properties to have collapsed but separated? Thanks : this is the wanted result: ![alt text](https://www.image-share.com/upload/302/57.gif)
CSS: table border separated horizontally and collapsed vertically
CC BY-SA 2.5
null
2010-07-20T12:47:53.230
2015-06-16T16:53:24.733
2017-02-08T14:28:54.887
-1
42,636
[ "html", "css" ]
3,290,557
1
3,382,049
null
1
96
I have been using analytics software for a while, and An example: ![alt text](https://i.imgur.com/lprwg.png) --- A major problem I encountered is . (account panel, form journeys, etc...) I guess this could be achieved by sending the html with the usability data, but I see this as a major performance problem... --- =) --- Further findings: -
How does Analytics and Usability software do this?
CC BY-SA 2.5
null
2010-07-20T13:44:25.153
2010-08-01T12:47:22.697
2010-07-20T13:52:13.797
208,827
208,827
[ "javascript", "html", "session", "iframe", "screen-scraping" ]
3,291,389
1
3,294,670
null
1
1,047
so i created a facebook app (fbml). canvas url = `http://mydomain.com/fb/canvas/` tab url = `tab.html` i authenticated my app with my profile and added the tab to my profile. but the tab keeps loading and loading. sometimes i also get redirected to my profile page after a short tab loading time ![alt text](https://dl.getdropbox.com/u/6357394/Bildschirmfoto%202010-07-20%20um%2016.59.00.png) trying to access my canvas page `http://apps.facebook.com/myapp/` works fine. also trying to access my tab page (which must be realtive to canvas) works with the apps url `http://apps.facebook.com/app/tab.html`. does anyone know why i cannot access my tab page via the tab of my profile? the content of `tab.html`is just a little bit of "lorem ipsum", no php, no js, no body tags, nothing, just text. looking into web-inspector, there is a file called `tab.php` which gets queried via ajax, but the content of this file is > for (;;);{"error":1357010,"errorSummary":"Oops","errorDescription":"Something went wrong. We're working on getting it fixed as soon as we can.","errorIsWarning":false,"silentError":0,"payload":null} is this a facebook issue? but the problem exists the whole day now
Facebook Tab not loading
CC BY-SA 2.5
null
2010-07-20T15:06:36.327
2010-07-23T13:09:34.597
2017-02-08T14:28:55.943
-1
253,288
[ "php", "html", "facebook", "fbml" ]
3,291,477
1
3,291,546
null
1
525
I created an iPhone application which can take photos and allow the user to edit them (moving and scaling), by setting the property `allowsEditing` to YES. My problem is that while editing, the bar at the bottom has a too long title (in french). ![title of app](https://i.stack.imgur.com/qvuAJ.png) So do you have any idea of how to change this text?
Change the toolbar title in UIImagePicker
CC BY-SA 3.0
null
2010-07-20T15:15:02.590
2011-12-10T04:57:51.267
2011-12-10T04:57:51.267
56,338
396,958
[ "iphone", "objective-c", "uiimagepickercontroller", "editing", "title" ]
3,294,457
1
null
null
4
505
I want to be able to define everything about a form field in one place, as opposed to having some info in the DB, some in HTML, some in JavaScript, some in ASP... Why do I have to worry about possibly changing things in four separate places (or more) when I want to change something about one field? I.e., I don't want to: - - - - Since I'm a developer, I'm ideally looking for a methodology, not a tool or S/W package. (I think!) , I'm doing this by putting all control information into SQL's extended property "Description" text area. E.g., a required phone number field would have the following SQL declaration: `[home_phone] [varchar](15) NOT NULL` and I put the following "controls" in the Description extended property: `["Home Phone"][phone_text][user_edit][required][allow_na][form_field_size_equals_size][default=""][group="home_address"][rollover="enter only: numbers, dash, parenthesis, space"][explanation="enter <strong>n/a</strong> if you don't have a home phone"]` With my current system, the following HTML is dynamically generated for the Home Phone field: ``` <div class="div-item" id="item-FORM:FIELD:TABLE_HOME:HOME_PHONE"> <div class="div-item-description" id="item_description-FORM:FIELD:TABLE_HOME:HOME_PHONE"> <span class="rollover-explanation" title="enter only: numbers, dash, parenthesis, space"> <label for="FORM:FIELD:TABLE_HOME:HOME_PHONE" id="item_label-FORM:FIELD:TABLE_HOME:HOME_PHONE"> Home Phone </label> </span> </div> <div class="div-item-stipulation" id="item_stipulation-FORM:FIELD:TABLE_HOME:HOME_PHONE"> <span class="stipulation-required" id="item_stipulation_span-FORM:FIELD:TABLE_HOME:HOME_PHONE" title="required" > * </span> </div> <div class="div-item-value" id="item_value-FORM:FIELD:TABLE_HOME:HOME_PHONE"> <div class="individual-forms"> <form class="individual-forms" id="FORM:TABLE_HOME:HOME_PHONE" name="FORM:TABLE_HOME:HOME_PHONE" action="" method="post" enctype="multipart/form-data" onsubmit="return(false);"> <div class="individual-forms-element"> <input class="" type="text" id="FORM:FIELD:TABLE_HOME:HOME_PHONE" name="FORM:FIELD:TABLE_HOME:HOME_PHONE" size="15" maxlength="15" value="" FORM_control="true" FORM_control_name="Home Phone" FORM_control_is_required="true" FORM_control_is_phone_text="true" > </div> </form> </div> </div> <span class="spanExplanation"> enter <strong>n/a</strong> if you don't have a home phone </span> </div> ``` which looks like this (in IE 7): ![html form field - phone number example](https://farm5.static.flickr.com/4139/4813396948_23bbc6a50c_o.png) Client-side JavaScript validation is controlled by the `**FORM_control**...` parameters, which on error produces explanations and field highlighting. (Unfortunately, custom parameters in HTML elements isn't exactly standards compliant.) is that this method using the Description field has always been cumbersome to use and maintain. The Description property can only be 255 chars, so I have lots of abbreviations. As the system has expanded, the number of controls has also greatly expanded past the original dozen or so. And my code for interpreting all these controls and their abbreviations is just not pretty or efficient. as I said, custom parameters in HTML elements don't work in FireFox. Things I'm currently controlling (and want to continue to control) include: - - - - - - - - - - - - - - - - - - And to be clear, I'm all for separation of logic and design elements. I do have a separate CSS file which is manually maintained (not part of the generation process). My server environment is classic (non-.Net) ASP and SQL 2008. I'm pretty good with HTML, CSS, JavaScript, and ASP and I'm comfortable with SQL. What I imagine that is some sort of JSON, XML, etc that is the single source used to generate everything, e.g.: - - - My current method that does this is dynamic (not compiled) and pretty slow, so I'm probably looking for some sort of "compiler" that generates this stuff once. And I really only have classic ASP, JavaScript or SQL as the available languages for this "compiler". And while I think I could create this system myself, I'm hoping that other, better developers have already come up with something similar. Assume this should scale to at least scores of fields. (FYI, my current form has way too many fields on one page, but I'm solving that issue separately.) Thanks for any help!
How do I control the definition, presentation, validation and storage of HTML form fields from one place?
CC BY-SA 2.5
0
2010-07-20T21:21:35.280
2010-08-11T15:32:44.623
2017-02-08T14:28:56.620
-1
12,293
[ "sql", "html", "forms", "methodology" ]
3,294,673
1
3,295,080
null
1
213
I would like to conditionally enable the `objc_exception_throw` global breakpoint for my app, only when I am doing a Debug build (not when doing a Release or Distribution build). ![alt text](https://farm5.static.flickr.com/4135/4812968163_7530528c46_b_d.jpg) Is there a way to specify this build condition in Xcode's Breakpoints window?
How to specify build condition for objc_exception_throw?
CC BY-SA 2.5
0
2010-07-20T21:48:33.327
2010-07-20T23:03:13.873
2017-02-08T14:28:56.963
-1
19,410
[ "iphone", "objective-c", "xcode", "exception", "breakpoints" ]
3,294,987
1
3,295,089
null
5
572
I have no idea what this error is about, the deadline for that application is tomorrow. I have no idea what is it about but it is refusing to compile. It is a giant project with over 150 source files and with about 20 3rd party dependencies. > Internal error occurred while creating dependency graph: -[PBXTargetBuildContext ]: unrecognized selector sent to instance I would really appreciate any help. This is freaking me out as it worked perfectly fine. has activated its "break in the last second mode". It is a hidden feature designed to drive developers mad. uses advanced heuristic algorithm to determine how important that project is. If it is important the following code executes: ``` - (void) goNuts { [popups displayAllPossiblePopups]; [build failWithError:[error someRandomIrrelevantError]]; } ``` And yes, I have rebooted my Mac. I am running XCode 3.2.2 but I don't think that matters as I haven't updated anything else because I always cancel those irritating update pop-ups. I wish there would be an "" mode which would disable all pop-up windows. ![I am frustrated](https://i.stack.imgur.com/NEFl4.png) Edit: : Thanks you've saved my life. I was literally ripping my own hair out because of that. The person who changed that and then committed the change better have an explanation for it.
XCode is not building my application because of some random thing
CC BY-SA 2.5
null
2010-07-20T22:46:32.797
2011-06-06T14:39:03.977
2011-01-31T00:21:02.563
160,868
160,868
[ "xcode", "pbx" ]
3,295,057
1
3,296,097
null
40
28,193
Consider a XAML TextBox in Win Phone 7. ``` <TextBox x:Name="UserNumber" /> ``` The goal here is that when the user presses the `Enter` button on the on-screen keyboard, that would kick off some logic to refresh the content on the screen. I'd like to have an event raised specifically for `Enter`. Is this possible? - - `Enter`- ![alt text](https://i.imgur.com/n2tbf.png)
Determining the Enter key is pressed in a TextBox
CC BY-SA 3.0
0
2010-07-20T22:58:52.113
2013-07-18T12:17:22.963
2012-01-14T17:27:13.593
13,154
23,199
[ "silverlight", "xaml", "windows-phone-7" ]