Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
4,808,109
1
9,393,282
null
4
11,313
In a container form I have menu and buttons to open ther forms. ![enter image description here](https://i.stack.imgur.com/uj449.jpg) Here I am facing a problem when I open any form these buttns and lables come over newly opened form. ![enter image description here](https://i.stack.imgur.com/QGiNV.jpg) Please guide me how I can manage this issue? I want to open a new form and keep these container form's controls in back ground of it.
Controls in container form come over child form?
CC BY-SA 3.0
0
2011-01-26T18:02:01.103
2022-09-13T16:55:47.250
2011-06-22T01:47:01.300
1,288
281,839
[ "c#", "winforms", ".net-3.5", "mdi", "mdichild" ]
4,808,721
1
null
null
6
2,146
I have two form classes (Form1 and Form2) in a Winforms App. Form1 is like this: ![Form1 with a button on it](https://i.stack.imgur.com/LPECH.png) Form2 is like this (ShowInTaskbar = false): ![Form2 with an OK and Cancel buttons](https://i.stack.imgur.com/FfmSu.png) And this code on Form1: ``` Form2 someForm = new Form2(); private void btOpenAnotherWindow_Click(object sender, EventArgs e) { if (someForm.ShowDialog(this) == DialogResult.OK) MessageBox.Show("OK!!!"); else MessageBox.Show("Not OK."); } ``` That is, a window with a button which opens another windows when clicked, and waits for the user to close the second window (by clicking the "OK" or "Cancel" button). And depending how it was closed, do alternating actions (represented here by the MessageBox.Show() calls). I need: 1. The user can use only one window at a time. (Modal forms, That's why I used ShowDialog() instead of Show()) 2. When the form closes, do something depending on how the form was closed (the "if (someForm.ShowDialog(this)...") 3. To be able (as a user) to minimize the WHOLE APP. 4. To be able to "unminimize" the app to the former state correctly. 5. The program to respond to WIN+M (minimize all) keys combination. the above example fails in two ways: 1. (need 5) Doesn't respond to WIN+M 2. (need 3) The app seems to minimize when the Minimize title bar button is clicked, but it is an illusion because the main form (Form1) does not minimize and it is in fact just hidden behind the other opened windows. Only running the example with an empty desktop shows what really happens. Pics follow: Before Minimize button is clicked: ![Empty desktop with the app running](https://i.stack.imgur.com/LqWEc.png) After: ![Empty desktop with the Form2 (someForm) minimized](https://i.stack.imgur.com/kTttL.png) Note: 1. The Main form is not minimized 2. The Form2 is in the left botton corner of the screen. Form2 is a full blown window (not a dialog window per se) and I need the user to interact with it only until it is closed and I also need the user to be able to miminize the whole app in case he needs it. It is a shame I can't post here the real forms, It would be clearer than these mock-ups. I need a solution that works with many levels of modal windows (not only two as this example shows). Any suggestions?
How to minimize a winforms app when there is at least one modal window opened
CC BY-SA 2.5
0
2011-01-26T18:59:56.393
2012-04-01T02:55:22.620
2012-04-01T02:55:22.620
3,043
129,568
[ "c#", ".net", "winforms" ]
4,808,758
1
4,808,782
null
22
4,618
There are a few PHP functions (such as [strstr](http://php.net/strstr), [strpos](http://php.net/strpos) and [strrchr](http://php.net/strrchr)) that accept a parameter named `$haystack`. Where does this name come from? ![enter image description here](https://i.stack.imgur.com/A6BsB.jpg)
The term "haystack" in the context of PHP
CC BY-SA 2.5
0
2011-01-26T19:03:26.000
2012-11-14T21:25:32.223
2011-01-26T19:55:17.087
106,224
200,145
[ "php", "parameters", "terminology" ]
4,808,922
1
4,808,937
null
0
1,126
I'm trying C++ pass-by-reference using this simple code: ``` #include <iostream> int square(int &x) { return x*x; } int main() { std::cout<<"Square of 4 is: "<<square(4)<<std::endl; return 0; } ``` But, when I try to run it, I get the following: ![enter image description here](https://i.stack.imgur.com/Sl54P.png) I get the following error after modifying the code based on @Pablo Santa Cruz's answer (I just screen captured part of the error): ![enter image description here](https://i.stack.imgur.com/Swe9Q.png) Why is that? Thanks.
C++ pass-by-reference
CC BY-SA 2.5
null
2011-01-26T19:20:39.893
2011-01-26T20:02:49.290
2011-01-26T19:30:48.413
588,855
588,855
[ "c++", "pass-by-reference" ]
4,808,957
1
4,809,754
null
3
1,113
I'm looking for strategies to speed up an agent-based model that's based on objects of class `Host`, pointers to which are stored in a Boost multi-index container. I've used Shark to determine that the vast majority of the time is consumed by a function `calcSI()`: ![enter image description here](https://i.stack.imgur.com/uaZkE.png) Function `calcSI()` has to compute for every instance of class `Host` certain probabilities that depend on attributes of other instances of class `Host`. (There are approximately 10,000-50,000 instances of `Host`, and these calculations are run for each host approximately 25,600 times.) If I'm interpreting the profile correctly, the majority of the time spent in `calcSI()` goes to `Host::isInfectedZ(int)`, which simply counts instances of something in a Boost unordered_multimap of type `InfectionMap`: ``` struct Infection { public: explicit Infection( double it, double rt ) : infT( it ), recT( rt ) {} double infT; double recT; }; typedef boost::unordered_multimap< int, Infection > InfectionMap; ``` All members of `Host` contain `InfectionMap carriage`, and `Host::isInfectedZ(int)` simply counts the number of `Infections` associated with a particular `int` key: ``` int Host::isInfectedZ( int z ) const { return carriage.count( z ); } ``` 1. I'm having trouble finding information on how costly the count function is for Boost's unordered multimaps. Should I increase the overhead by adding to Host a separate two-dimensional array to track the number of instances of each key (i.e., the number of Infections associated with each int)? 2. I'm wondering if a larger structural overhaul of the Boost multi-index, like eliminating one or two less-needed composite key indices, would be more helpful. The background maintenance of the multi-index doesn't appear in the profiler, which (maybe stupidly) makes me worry it might be large. I have 8 indices in the multi-index, most of which are ordered_non_unique. 3. Are there other things I should be concerned with that might not appear in the profiler, or am I missing a major result from the profiler? Parallelization and multithreading of `calcSI()` are unfortunately not options. It might be helpful to know that `InfectionMap carriage` rarely has more than 10 pairs and usually has <5. --- I tried the strategy proposed in #1 above, giving each `Host` an array `int carriageSummary[ INIT_NUM_STYPES ]`, which is indexed by the possible values of `z` (for most simulations, there are <10 possible values). The value of each entry tracks changes made to `carriage`. The `Host::isInfectedZ( int z )` function now reads: ``` int Host::isInfectedZ( int z ) const { //return carriage.count( z ); return carriageSummary[ z ]; } ``` And the time dedicated to this function to have dropped substantially--I can't do an exact comparison right now: ![enter image description here](https://i.stack.imgur.com/2LMNk.png) `z` Would love any feedback on changing multi-index too.
Need to speed up C++ code involving Boost multi-index and lookups to unordered_multimap
CC BY-SA 2.5
null
2011-01-26T19:23:26.163
2011-01-26T21:11:16.117
2011-01-26T20:43:23.833
197,646
197,646
[ "c++", "boost", "multimap", "multi-index", "unordered" ]
4,809,153
1
4,810,453
null
0
535
I Netbeans when I run my program it shows my buttons like this: ![enter image description here](https://i.stack.imgur.com/Kxlcf.jpg) Left side is how it should look. Right hand side is how it's showing up when I run the file. anyone know what's happening and how to fix it?
netbeans not displaying form correctly
CC BY-SA 2.5
0
2011-01-26T19:39:03.483
2011-01-26T21:52:18.197
2011-01-26T19:49:32.157
513,838
229,616
[ "java", "netbeans" ]
4,810,074
1
4,810,990
null
1
990
I currently have a fairly long LINQ statement which pulls data from two tables: Employee, and Time. This IQueryable is displayed in a Telerik RadGrid via the Grids DataSource. My goal is to show the Employee's Hours for that Period and allow the User to upload the Approved Timesheet to the system. ``` public static IQueryable GetUnimportedTimesheets() { DataContext tData = new DataContext(); var Times = tData.system_Times.Where(a => a.Status == 0) .OrderBy(a => a.Period) .ThenBy(a => a.system_Employee.LName) .GroupBy(a => new { a.Period , a.EmployeeID } ) .Select(x => new { Times = x.FirstOrDefault(), TotalReg = tData.system_Times .Where(b => b.EmployeeID == x.Key.EmployeeID && b.PayCode == "211") .Sum(b => b.Hours), TotalOT = tData.system_Times .Where(b => b.EmployeeID == x.Key.EmployeeID && b.PayCode == "212") .Sum(b => b.Hours), TotalTrav = tData.system_Times .Where(b => b.EmployeeID == x.Key.EmployeeID && b.PayCode == "214") .Sum(b => b.Hours), TotalSub = tData.system_Times .Where(b => b.EmployeeID == x.Key.EmployeeID && b.PayCode == "251") .Sum(b => b.Hours), FName = tData.system_Employees .Where(b => b.EmployeeID == x.Key.EmployeeID) .Select(c => c.FName).FirstOrDefault(), LName = tData.system_Employees .Where(b => b.EmployeeID == x.Key.EmployeeID) .Select(c => c.LName).FirstOrDefault(), Div = tData.system_Employees .Where(b => b.EmployeeID == x.Key.EmployeeID) .Select(c => c.Dept).FirstOrDefault(), AccID = tData.Pmsystem_Employees .Where(b => b.EmployeeID == x.Key.EmployeeID) .Select(c => c.AccountingID).FirstOrDefault(), Period = tData.system_Times .Where(b => b.EmployeeID == x.Key.EmployeeID) .Select(c => c.Period).FirstOrDefault(), Status = tData.system_Times .Where(b => b.EmployeeID == x.Key.EmployeeID) .Select(c => c.Status).FirstOrDefault() } ); return Times; } ``` Although I've stated at the beginning of the statement to GroupBy both the EmployeeID and the Period, the output is still only grouping by the EmployeeID. The image below is the current output, which should be separated by Period and the EmployeeID, not just the EmployeeID. ![Current RadGrid](https://i.stack.imgur.com/JwdRh.png) What could be the problem with my statement, and how I can re-work it to GroupBy BOTH the Period, and EmployeeID?
Multiple-Entity GroupBy not dishing out Distinct Values - LINQ
CC BY-SA 2.5
null
2011-01-26T21:09:44.523
2011-01-27T00:05:41.487
2011-01-26T21:23:18.397
390,278
537,172
[ "c#", "linq", "group-by", "distinct" ]
4,810,440
1
4,810,725
null
1
86
How can I make this in HTML/CSS (no javascript!!): ![enter image description here](https://i.stack.imgur.com/SkmGF.png) Everything should be inside a div, which has fluid width. It only has to work in Google Chrome. I just can't figure this out.
How can I create this specific layout using html and css?
CC BY-SA 2.5
null
2011-01-26T21:51:16.660
2011-01-26T23:19:50.890
null
null
544,120
[ "html", "css", "google-chrome" ]
4,810,434
1
4,810,778
null
2
211
So I have CSS to regulate the size of all the input types on the page. However I still notice some not being regulated in terms of length. The CSS I am using is this: ``` .leftRightBorder select, .leftRightBorder textarea, .leftRightBorder input[type=text] { width: 150px; } ``` Here is a picture of the page using the above CSS: ![enter image description here](https://i.stack.imgur.com/auy7G.png) As you can see there are still some minor length issues. But the main question I have is, the 'Payment Day' and 'Roll Day' fields on each component are within the same table cell so even if I put a between them the spacing doesn't equal the vertical spacing between everything else on the page. How do I regular vertical spacing between everything on the page? EDIT: Here is the ASP.NET Code: ``` <tr id="tr63"> <td id="td64"> Payment Day </td> <td id="td65" class="leftRightBorder"> <%= Html.DropDownListFor(m => m.FixedComponent.PaymentDay, DropDownData.DaysOfMonthList(), "", new { propertyName = "FixedComponent.PaymentDay", onchange = "UpdateField(this);" })%> <%= Html.DropDownListFor(m => m.FixedComponent.PaymentBusinessDayConvention, DropDownData.BusinessDayConventionList(), "", new { propertyName = "FixedComponent.PaymentBusinessDayConvention", onchange = "UpdateField(this);" })%> </td> <td id="td66" /> <td id="td67"> Payment Day </td> <td id="td68" class="leftRightBorder"> <%= Html.DropDownListFor(m => m.FloatingComponent.PaymentDay, DropDownData.DaysOfMonthList(), "", new { propertyName = "FloatingComponent.PaymentDay", onchange = "UpdateField(this);", disabled="disabled" })%> <%= Html.DropDownListFor(m => m.FloatingComponent.PaymentBusinessDayConvention, DropDownData.BusinessDayConventionList(), "", new { propertyName = "FloatingComponent.PaymentBusinessDayConvention", onchange = "UpdateField(this);", disabled="disabled" })%> </td> </tr> ``` I want spacing BETWEEN the HTML Helpers to equal the spacing between everything else on the page. Hope this helps.
CSS to regulate spacing within table cells and entire page as one
CC BY-SA 2.5
null
2011-01-26T21:50:23.057
2011-02-04T16:46:21.350
2011-01-26T22:27:51.367
534,101
534,101
[ "html", "css" ]
4,810,522
1
4,810,665
null
1
2,635
I am building a music streaming site, where users will be able to purchase and stream mp3's. I have a subset entity diagram which can be described as follows: ![ER DIAGRAM](https://i.stack.imgur.com/0Cg1N.png) I want to normalise the data to 3NF. How many tables would I need? obviously I want to avoid including partial dependancies, which would require more tables than just album, artist, songs - but I'm not sure what else to add? Any thoughts from experience?
Database design
CC BY-SA 2.5
0
2011-01-26T21:59:19.107
2011-01-27T15:21:03.610
2011-01-26T22:03:54.090
135,152
554,437
[ "database", "database-design", "data-modeling" ]
4,810,806
1
4,814,463
null
182
8,357
▉ (100 bountys, awarded) Main question was how to make this site, load faster. First we needed to read these waterfalls. Thanks all for your suggestions on the waterfall readout analysis. Evident from the various waterfall graphs shown here is the main bottleneck: the PHP-generated thumbnails. The protocol-less jquery loading from CDN advised by David got my bounty, albeit making my site only 3% faster overall, and while not answering the site's main bottleneck. Time for for clarification of my question, and, another bounty: ▉ (100 bountys, awarded) The new focus was now to solve the problem that the 6 jpg images had, which are causing the most of the loading-delay. These 6 images are PHP-generated thumbnails, tiny and only 3~5 kb, but loading relatively slowly. Notice the "" on the various graphs. The problem remained unsolved, but a bounty went to James, who fixed the header error that RedBot [underlined](https://i.stack.imgur.com/FLWNX.png): . ▉ (my last bounty: 250 points) Unfortunately, after even REdbot.org header error was fixed, the delay caused by the PHP-generated images remained untouched. What on earth are these tiny puny 3~5Kb thumbnails thinking? All that header information can send a rocket to moon and back. Any suggestions on this bottleneck is much appreciated and treated as possible answer, since I am stuck at this bottleneckish problem for already seven months now. [Some background info on my site: CSS is at the top. JS at the bottom (Jquery,JQuery UI, bought menu awm/menu.js engines, tabs js engine, video swfobject.js) The black lines on the second image show whats initiating what to load. The angry robot is my pet "ZAM". He is harmless and often happier.] --- | [http://webpagetest.org](http://webpagetest.org) ![enter image description here](https://i.stack.imgur.com/0LdLq.png) --- | [http://webpagetest.org](http://webpagetest.org) ![enter image description here](https://i.stack.imgur.com/KqdKq.png) --- | [http://site-perf.com](http://site-perf.com) ![enter image description here](https://i.stack.imgur.com/DuZzJ.png) --- | [http://tools.pingdom.com](http://tools.pingdom.com) ![enter image description here](https://i.stack.imgur.com/pTbCb.png) --- | [http://gtmetrix.com](http://gtmetrix.com) ![enter image description here](https://i.stack.imgur.com/DzIR3.png) ---
Cached, PHP generated Thumbnails load slowly
CC BY-SA 4.0
0
2011-01-26T22:29:09.950
2020-08-31T09:12:23.757
2020-08-31T09:12:23.757
5,740,428
509,670
[ "php", "performance", ".htaccess", "cache-control" ]
4,810,886
1
4,812,093
null
2
1,273
I am trying to load a texture for a cube and I have trouble with the dimensions I use. The texture has the power of two (256x256). When it should use 256 as width and height it throws an exception: ``` java.lang.IndexOutOfBoundsException: Required 262144 remaining bytes in buffer, only had 68998 at com.jogamp.common.nio.Buffers.rangeCheckBytes(Buffers.java:828) ``` The code: ``` private void initTexture(GL2ES2 gl) { try { BufferedImage bufferedImage = ImageIO.read(new URI("http://192.168.0.39/images/box.gif").toURL()); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ImageIO.write(bufferedImage, "gif", byteArrayOutputStream); byte[] imageData = byteArrayOutputStream.toByteArray(); imageBuffer = ByteBuffer.wrap(imageData); } catch (Exception e) { e.printStackTrace(); } imageBuffer.rewind(); gl.glGenTextures(1, textureIds, 0); gl.glBindTexture(GL2ES2.GL_TEXTURE_2D, textureIds[0]); gl.glTexImage2D(GL2ES2.GL_TEXTURE_2D, 0, GL2ES2.GL_RGBA, 256, 256, 0, GL2ES2.GL_RGBA, GL2ES2.GL_UNSIGNED_BYTE, imageBuffer); gl.glTexParameteri(GL2ES2.GL_TEXTURE_2D, GL2ES2.GL_TEXTURE_MAG_FILTER, GL2ES2.GL_LINEAR); gl.glTexParameteri(GL2ES2.GL_TEXTURE_2D, GL2ES2.GL_TEXTURE_MIN_FILTER, GL2ES2.GL_LINEAR_MIPMAP_NEAREST); gl.glGenerateMipmap(GL2ES2.GL_TEXTURE_2D); gl.glBindTexture(GL2ES2.GL_TEXTURE_2D, 0); } ``` When I change the parameter width/height to 128 the exception disappears but the cubes show wrong colors: ![enter image description here](https://i.stack.imgur.com/roVnC.png) As bestsss mentioned, the reason might be some raw format. The problem: I can't fix this. I tried multiple images and formats. Created them with gimp (working on ubuntu) but the exception is always the same. So I guess the reason for that is that I read the image in a wrong way. Some ideas? My solution (which uses JOGL classes TextureIO and Texture): ``` Texture texture; private void initTexture(GL2ES2 gl) { try { texture = TextureIO.newTexture(new URI("http://192.168.0.39/images/box.gif").toURL(),true,null); texture.setTexParameterf(GL2ES2.GL_TEXTURE_MIN_FILTER, GL2ES2.GL_LINEAR_MIPMAP_LINEAR); texture.setTexParameterf(GL2ES2.GL_TEXTURE_MAG_FILTER, GL2ES2.GL_LINEAR); } catch (Exception e) { e.printStackTrace(); } } public void display(GL2ES2 gl) { // code snipped if (texture != null) { texture.enable(); texture.bind(); } // code snipped } ```
Loading texture doesn't work with the correct texture width/height
CC BY-SA 2.5
null
2011-01-26T22:38:44.933
2011-01-27T16:19:30.597
2011-01-27T16:19:30.597
180,538
180,538
[ "java", "image", "opengl-es", "textures", "image-formats" ]
4,810,915
1
4,812,024
null
0
199
Here's my CSS: ``` <style type="text/css"> .leftRightBorder select, .leftRightBorder textarea, .leftRightBorder input[type=text] { width: 150px; margin-bottom: 5px; } </style> ``` Here's the top portion of my page as an image: ![enter image description here](https://i.stack.imgur.com/PEmIR.png) The CSS styles/spaces/lengths (is that a word) everything on the page beautifually, but this top section is still weird, the maturity date two dropdowns, and value date is a little weird too. Here is the ASP for this top section: ``` <tr id="tr14"> <td id="td15"> <%= Html.LabelFor(m => m.MaturityDate) %> </td> <td id="td16" style="width: 150px;"> <%= Html.TextBox("MaturityDate", Model.MaturityDate.HasValue ? Model.MaturityDate.Value.ToString("dd-MMM-yyyy") : "", new { @class = "economicTextBox", propertyName = "MaturityDate", onchange = "parseAndSetDt(this); ", dataType = "Date" })%> <%= Html.DropDownListFor(m => m.AmortizationComponent.MaturityBusinessDayConvention, DropDownData.BusinessDayConventionList(), "", new { propertyName = "AmortizationComponent.MaturityBusinessDayConvention", onchange = "UpdateField(this);" })%> </td> <td id="td17" style="width: 76px"> Value Date </td> <td id="td18" style="width: 150px"> <%= Html.TextBoxWithPermission("RateTimeStamp", Model.RateTimeStamp.HasValue ? Model.RateTimeStamp.Value.ToString("dd-MMM-yyyy") : "", new string[] { PERMISSIONS.hasICAdvanced }, new { @class = "economicTextBox", propertyName = "RateTimeStamp", onchange = "parseAndSetDt(this);", dataType = "Date" })%> <br /> <%= Html.CheckBoxForWithPermission(m => m.Current, new string[] { PERMISSIONS.hasICAdvanced }, new { @class = "economicTextBox", propertyName = "Current", onchange = "UseCurrent();UpdateField(this);" })%> Current </td> </tr> ``` Why isn't this part being styled effectively?
CSS not working on every element
CC BY-SA 2.5
null
2011-01-26T22:41:12.660
2011-01-27T01:08:46.867
2011-01-27T01:03:43.530
61,164
534,101
[ "html", "css", "asp.net-mvc-2" ]
4,811,100
1
4,812,379
null
0
4,886
Lets say I got two images in VB.NET. Both are 100x100. Then I want to copy a section of the first image and paste it on the second image. For example, lets say I want to pickup the rectangle (25,25,75,75) from the first image, and paste it at (25,25) point of the second image. Sorry, it is hard to explain, so here's an example image: ![EXAMPLE](https://i.stack.imgur.com/1WECx.png)
Copy a section of an image and paste it in another?
CC BY-SA 2.5
null
2011-01-26T22:57:57.573
2011-01-27T03:14:18.317
null
null
555,690
[ "vb.net", "graphics", "copy", "paste" ]
4,811,149
1
4,811,943
null
1
863
I'm building a custom swing component (more as a practical thought experiment than anything else). I'm having problems with repainting. My component has a `jtree`, a `jtable`, and then a part that is totally custom painted (hopefully ending up to be quite MS project-esque ganttview) The specific problem is that when the jtree expands, the table and the gannt view should update to reflect the new sub projects under the newly expanded treenode. They do this, but the size doesn't update, so the table doesn't show the additional rows, and my gannt display doesn't use up the full height either. the odd thing is that if I touch the window handle on the `jframe` (so even a 1px resize) - this seems to force a complete refresh and the component then displays properly, both the table in the middle and the gannt on the right fill up the display. If I don't do a resize, then repaint is called when the nodes in the tree are expanded/collapsed, as I see the ganttview update, but it doesn't seem to expand to take up the full height of the screen. I have put in a screenshot below which shows at the top the correct display after a resize(), and the lower half, which is what I see if I expand a node without doing a resize. My assertion is that the component knows how to to repaint() itself correctly, as it does the right thing on resize, but this must be triggering a special event that forces a fuller refresh. I have tried various combinations of `update`(), `invalidate`(), `repaint`(), but I can't seem to emulate the full `repaint`() that happens when the parent form is resized. ![Screenshot](https://i.stack.imgur.com/6F0s7.jpg) Thanks, Ace
Custom swing component: Problem with repaint()
CC BY-SA 2.5
null
2011-01-26T23:04:42.673
2011-01-27T00:57:24.337
null
null
140,260
[ "java", "swing", "custom-component" ]
4,811,275
1
4,812,226
null
1
1,264
I am not able to get my app loaded on my phone unless I set the bundle identifier in info.plist to the full app ID prefixed by the bundle seed ID "12345.com.app.name". When I put the correct bundle ID of "com.app.name" I get the dreaded error of "your application’s Code Signing Entitlements file do not match those specified in your provisioning profile." What I think may be part of the issue: I noticed I'm getting strange behavior I haven't seen before... normally in the build settings under "code signing identity" you can see which certificates and provisioning profiles match up ![](https://i.stack.imgur.com/hUdPW.png) However I'm not seeing that in my GUI, which just lists the certs without telling me which provisioning profile they match: ![enter image description here](https://i.stack.imgur.com/iXGeE.png) My provisioning profiles are definitely installed - they all show up in the organizer and I can in fact build for the device fine (but only when I set bundle ID to include the seed ID). Anybody know why my screenshot doesn't include the provisioning profile matches? XCode does get confused sometimes, solvable by restart/reboot, but unfortunately this was not one of those cases...
Not able to select provisioning file in XCode build settings under "code signing identity"
CC BY-SA 2.5
0
2011-01-26T23:20:33.337
2013-04-11T07:19:33.563
2011-02-07T22:02:02.493
131,482
131,482
[ "iphone", "xcode" ]
4,811,297
1
null
null
3
164
I've learned to never underestimate what PHP and some libraries can do, so for this paper effect, can it be done with a php graphics library (or at least programmatically) without needing something like Photoshop or Illustrator? To be clear, I'm asking just about the paper, not the iphone. Dan Grossman's answer is great. I'm also wondering if someone can give me algorithmic ideas what might be happening in this image so I could try to possibly come up with some code to map it mathematically. My visual imagination is failing me a little. ![enter image description here](https://i.stack.imgur.com/TwH7v.jpg)
Is this effect possible with php code, without special software
CC BY-SA 2.5
null
2011-01-26T23:22:37.733
2011-01-26T23:37:28.427
2011-01-26T23:37:28.427
438,520
438,520
[ "php", "graphics" ]
4,811,481
1
15,298,020
null
0
1,444
I'm trying to fix a problem with a file download that isn't working in IE from an ASP.NET MVC application. The controller action looks something like this: ``` [HttpGet] [OutputCache(Duration = 0, NoStore = true, VaryByParam = "*")] public FileResult GetTemplate(int id) { var data = GetData(id); return File(Encoding.ASCII.GetBytes(data), MimeType.Csv.Type, "template.csv"); } ``` The download is initiated using a `window.open()` call in javascript. It works fine in Firefox, but not IE. ![IE download error](https://i.stack.imgur.com/eJh8n.png) If I remove the `OutputCache` attribute then it works fine in IE.
Downloading file in IE doesn't work when caching enabled
CC BY-SA 2.5
null
2011-01-26T23:45:44.200
2013-03-08T15:54:59.543
2011-01-27T23:22:17.930
80,282
80,282
[ "asp.net-mvc", "internet-explorer", "download", "outputcache" ]
4,811,567
1
4,811,625
null
1
1,766
I am attaching an image. Some of you might have tried this iphone application before. It is a screen shot from Awesome Note. How do they achieve the 5 rows table view, with a swipe to next page for more rows? Basically the (at least I think it's a TableView?) is confined to the bottom half of the . Any swipe to the left or right jumps to the next page and you see the next 5 rows (if any.) We can see from the screenshot that there are 11 rows, since it's 3 pages in depth. Is this achieved using a TableViewController inside a UIScrollView or something? I've setup my own custom , along with a . Inside interface builder when I check Attributes section for my UITableView I see an checkbox for , which I've ticked. I've also disabled Vertical Scrollers but this seems to have no effect? I'm obviously missing something, seeing as I haven't even seen where I can define how many rows / sections I'd like to render on one page before another page is created. Any help would be appreciated. Thanks! ![Awesome Note - Rows Example](https://i.stack.imgur.com/czsTQ.png)
How to achieve paginated UITableView like in this example?
CC BY-SA 2.5
null
2011-01-26T23:58:28.347
2011-01-27T00:05:35.697
null
null
312,411
[ "iphone", "objective-c", "cocoa-touch", "uitableview", "ios4" ]
4,811,557
1
4,812,229
null
29
8,554
Attempting to cutover our EF4 solution to EF CTP5, and ran into a problem. Here's the relevant portion of the model: ![enter image description here](https://i.stack.imgur.com/OZqCO.png) The pertinent relationship: - A single has - A single has a Now, i want to perform the following query: - Get all Counties in the system, and include all the Cities, and all the State's for those Cities. In EF4, i would do this: ``` var query = ctx.Counties.Include("Cities.State"); ``` In EF CTP5, we have a strongly typed Include, which takes an `Expression<Func<TModel,TProperty>>`. I can get all the Cities for the County no problem: ``` var query = ctx.Counties.Include(x => x.Cities); ``` But how can i get the for those Cities too? I am using pure POCO's, so `County.Cities` is an `ICollection<City>`, therefore i cannot do this: ``` var query = ctx.Counties.Include(x => x.Cities.State) ``` As `ICollection<City>` does not have a property called `State`. It's almost like i need to use a nested IQueryable. Any ideas? Do i need to fallback to the magic string Include in this scenario?
EF CTP5 - Strongly-Typed Eager Loading - How to Include Nested Navigational Properties?
CC BY-SA 2.5
0
2011-01-26T23:56:45.727
2011-01-27T02:48:02.710
2011-01-27T02:37:15.130
321,946
321,946
[ "entity-framework", "poco", "eager-loading", "entity-framework-ctp5" ]
4,811,577
1
4,811,606
null
1
344
Hey all, I'm having a strange issue today after upgrading to the latest jqueryui. My tab containers aren't working anymore. Its styling the tabs, but appearing like so: ![Jquery Tabs Issue](https://i.stack.imgur.com/HICrk.png) As well, all three content frames are being shown in a large column, instead of one at a time. Has anybody seen this problem before? It works fine if I go back to 1.8.5, but I need to use the newer version now. Help!? I'm not styling these tabs in any way outside of jquery, and the markup is exactly like the examples. Removing the content from the tabs has the same result, all three frames show up in a column. *edit * It does appear that jquery-ui-1.8.9.custom.min.js is causing the problem, not the theme. The tabs stop working when I update to 1.8.9. I take it from the lack of responses so far that this isn't a common problem.
Jquery Tabs not displaying properly after upgrading to 1.8.9
CC BY-SA 2.5
null
2011-01-26T23:59:23.590
2011-01-27T21:30:21.920
2011-01-27T21:30:21.920
387,199
387,199
[ "jquery", "tabs" ]
4,811,734
1
4,813,453
null
3
558
I am trying to design an event driven system where the elements of the system communicate by generating events that are responded to by other components of the system. It is intended that the components be independent of each other - or as largely independent as I can make them. The system will initially be implemented on Windows 7, and is being written in Delphi. The generated events will be generated by the Delphi code. I understand how to implement a system of the type described on a single machine. I wish to design the system so that it can readily be deployed on different machine architectures in particular with different components running on a distributed architecture, which may well be different to Windows 7. There is no requirement for the system ever to communicate with any systems external to itself. I have tried investigating the architecture I need to consider and have looked at the questions mentioned below. These seem to point towards utilising named pipes as a mechanism for inter-hardware communications. As a result of these investigations I have sketched out the following to describe my system - the first part of the diagram is the system as I am developing it; the second part what I have deduced I would need for possible future implementations. ![Design sketch](https://i.stack.imgur.com/T7L8W.png) This leads to the following points: 1. Can you pass events via named pipes? 2. Is this an appropriate and sensible structure to tackle this problem? 3. Are there better alternatives? 4. What have I forgotten (at this level of granularity)? [How is event driven programming implemented?](https://stackoverflow.com/questions/4046994/how-is-event-driven-programming-implemented) [How do I send a string from one instance of my Delphi program to another?](https://stackoverflow.com/questions/512366/how-do-i-send-a-string-from-one-instance-of-my-delphi-program-to-another) I had not given the points arising from "@I give crap answers" response sufficient consideration. My initial responses to his points are: 1. Synchronous v Asynchronous - mostly asynchronous 2. Events will always be in a FIFO queue. 3. Connection loss - is not terribly important - I can afford to deal with this non-rigourously. 4. Unbounded queues are a perfectly good way of dealing with events passed (if they can be) - there is no expectation of large volume of event generation.
What elements are needed to implement a remote, event driven system? - overview needed
CC BY-SA 2.5
0
2011-01-27T00:20:33.180
2011-01-27T12:54:51.627
2017-05-23T10:32:36.133
-1
441,969
[ "delphi", "events", "distributed" ]
4,811,600
1
null
null
3
1,058
I'm creating a store for my wife in Drupal. I'm not a web person and kept things pretty vanilla except for a few changes. It's not my first Drupal site but is my first store. Using Firebug I have found the divs and have been able to change the colors where necessary. I now need to make one change but I can't find where the problem is. If I open up the table I want to change the background color of in Firebug I can view the css: ![Firebug](https://i.stack.imgur.com/hTr5g.png) As you can see the background color reads as transparent. If I click on the link where Firebug shows the css is coming from it points to [http://10.0.1.151/sites/default/files/css](http://10.0.1.151/sites/default/files/css) - The files in there look like caches of the css as they have very recent times and dates on. If I change the background color temporarily using firebug: ![Firebug 2](https://i.stack.imgur.com/hH1qV.png) the table looks exactly how I want it. So I guess my question is how do I make that change to the style sheet so its permanent? Thanks in advance, Andrew PS. I've chopped some of the bottom of style sheet of because I'm new and the site wont let me post more. Below is a copy of `style.css`: ``` /* $Id: style.css,v 1.1.2.11 2010/07/02 22:11:04 sociotech Exp $ */ /* Margin, Padding, Border Resets -------------------------------------------------------------- */ html, body, div, span, p, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form, fieldset, input, textarea { margin: 0; padding: 0; } img, abbr, acronym { border: 0; } /* HTML Elements -------------------------------------------------------------- */ p { margin: 1em 0; } h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em 0; } ul, ol, dd { margin-bottom: 1.5em; margin-left: 2em; /* LTR */ } li ul, li ol { margin-bottom: 0; } ul { list-style-type: disc; } ol { list-style-type: decimal; } a { margin: 0; padding: 0; text-decoration: none; } a:link, a:visited { } a:hover, a:focus, a:active { text-decoration: underline; } blockquote { } hr { height: 1px; border: 1px solid gray; } /* tables */ table { border-spacing: 0; width: 100%; } caption { text-align: left; } th { margin: 0; padding: 0 10px 0 0; } th.active img { display: inline; } thead th { padding-right: 10px; } td { margin: 0; padding: 3px; } /* Remove grid block styles from Drupal's table ".block" class */ td.block { border: none; float: none; margin: 0; } /* Maintain light background/dark text on dragged table rows */ tr.drag td, tr.drag-previous td { background: #FFFFDD; color: #000; } /* Accessibility /-------------------------------------------------------------- */ /* skip-link to main content, hide offscreen */ #skip a, #skip a:hover, #skip a:visited { height: 1px; left: 0px; overflow: hidden; position: absolute; top: -500px; width: 1px; } /* make skip link visible when selected */ #skip a:active, #skip a:focus { background-color: #fff; color: #000; height: auto; padding: 5px 10px; position: absolute; top: 0; width: auto; z-index: 99; } #skip a:hover { text-decoration: none; } /* Helper Classes /-------------------------------------------------------------- */ .hide { display: none; visibility: hidden; } .left { float: left; } .right { float: right; } .clear { clear: both; } /* clear floats after an element */ /* (also in ie6-fixes.css, ie7-fixes.css) */ .clearfix:after, .clearfix .inner:after { clear: both; content: "."; display: block; font-size: 0; height: 0; line-height: 0; overflow: auto; visibility: hidden; } /* Grid Layout Basics (specifics in 'gridnn_x.css') -------------------------------------------------------------- */ /* center page and full rows: override this for left-aligned page */ .page, .row { margin: 0 auto; } /* fix layout/background display on floated elements */ .row, .nested, .block { overflow: hidden; } /* full-width row wrapper */ div.full-width { width: 100%; } /* float, un-center & expand nested rows */ .nested { float: left; /* LTR */ margin: 0; width: 100%; } /* allow Superfish menus to overflow */ #sidebar-first.nested, #sidebar-last.nested, div.superfish { overflow: visible; } /* sidebar layouts */ .sidebars-both-first .content-group { float: right; /* LTR */ } .sidebars-both-last .sidebar-first { float: right; /* LTR */ } /* Grid Mask Overlay -------------------------------------------------------------- */ #grid-mask-overlay { display: none; left: 0; opacity: 0.75; position: absolute; top: 0; width: 100%; z-index: 997; } #grid-mask-overlay .row { margin: 0 auto; } #grid-mask-overlay .block .inner { background-color: #e3fffc; outline: none; } .grid-mask #grid-mask-overlay { display: block; } .grid-mask .block { overflow: visible; } .grid-mask .block .inner { outline: #f00 dashed 1px; } #grid-mask-toggle { background-color: #777; border: 2px outset #fff; color: #fff; cursor: pointer; font-variant: small-caps; font-weight: normal; left: 0; -moz-border-radius: 5px; padding: 0 5px 2px 5px; position: absolute; text-align: center; top: 22px; -webkit-border-radius: 5px; z-index: 998; } #grid-mask-toggle.grid-on { border-style: inset; font-weight: bold; } /* Site Info -------------------------------------------------------------- */ #header-site-info { width: auto; } #site-name-wrapper { float: left; /* LTR */ } #site-name, #slogan { display: block; } #site-name a:link, #site-name a:visited, #site-name a:hover, #site-name a:active { text-decoration: none; } #site-name a { outline: 0; } /* Regions -------------------------------------------------------------- */ /* Header Regions -------------------------------------------------------------- */ #header-group { overflow: visible; } /* Content Regions (Main) -------------------------------------------------------------- */ .node-bottom { margin: 1.5em 0 0 0; } /* Clear floats on regions -------------------------------------------------------------- */ #header-top-wrapper, #header-group-wrapper, #preface-top-wrapper, #main-wrapper, #preface-bottom, #content-top, #content-region, #content-bottom, #postscript-top, #postscript-bottom-wrapper, #footer-wrapper, #footer-message-wrapper { clear: both; } /* Drupal Core /-------------------------------------------------------------- */ /* Lists /-------------------------------------------------------------- */ .item-list ul li { margin: 0; } .block ul, .block ol { margin-left: 2em; /* LTR */ padding: 0; } .content-inner ul, .content-inner ol { margin-bottom: 1.5em; } .content-inner li ul, .content-inner li ol { margin-bottom: 0; } .block ul.links { margin-left: 0; /* LTR */ } /* Menus /-------------------------------------------------------------- */ ul.menu li, ul.links li { margin: 0; padding: 0; } /* Primary Menu /-------------------------------------------------------------- */ /* use ID to override overflow: hidden for .block, dropdowns should always be visible */ #primary-menu { overflow: visible; } /* remove left margin from primary menu list */ #primary-menu.block ul { margin-left: 0; /* LTR */ } /* remove bullets, float left */ .primary-menu ul li { float: left; /* LTR */ list-style: none; position: relative; } /* style links, and unlinked parent items (via Special Menu Items module) */ .primary-menu ul li a, .primary-menu ul li .nolink { display: block; padding: 0.75em 1em; text-decoration: none; } /* Add cursor style for unlinked parent menu items */ .primary-menu ul li .nolink { cursor: default; } /* remove outline */ .primary-menu ul li:hover, .primary-menu ul li.sfHover, .primary-menu ul a:focus, .primary-menu ul a:hover, .primary-menu ul a:active { outline: 0; } /* Secondary Menu /-------------------------------------------------------------- */ .secondary-menu-inner ul.links { margin-left: 0; /* LTR */ } /* Skinr styles /-------------------------------------------------------------- */ /* Skinr selectable helper classes */ .fusion-clear { clear: both; } div.fusion-right { float: right; /* LTR */ } div.fusion-center { float: none; margin-left: auto; margin-right: auto; } .fusion-center-content .inner { text-align: center; } .fusion-center-content .inner ul.menu { display: inline-block; text-align: center; } /* required to override drupal core */ .fusion-center-content #user-login-form { text-align: center; } .fusion-right-content .inner { text-align: right; /* LTR */ } /* required to override drupal core */ .fusion-right-content #user-login-form { text-align: right; /* LTR */ } /* Large, bold callout text style */ .fusion-callout .inner { font-weight: bold; } /* Extra padding on block */ .fusion-padding .inner { padding: 30px; } /* Adds 1px border and padding */ .fusion-border .inner { border-width: 1px; border-style: solid; padding: 10px; } /* Single line menu with separators */ .fusion-inline-menu .inner ul.menu { margin-left: 0; /* LTR */ } .fusion-inline-menu .inner ul.menu li { border-right-style: solid; border-right-width: 1px; display: inline; margin: 0; padding: 0; white-space: nowrap; } .fusion-inline-menu .inner ul.menu li a { padding: 0 8px 0 5px; /* LTR */ } .fusion-inline-menu .inner ul li.last { border: none; } /* Hide second level (and beyond) menu items */ .fusion-inline-menu .inner ul li.expanded ul { display: none; } /* Multi-column menu style with bolded top level menu items */ .fusion-multicol-menu .inner ul { margin-left: 0; /* LTR */ text-align: left; /* LTR */ } .fusion-multicol-menu .inner ul li { border-right: none; display: block; font-weight: bold; } .fusion-multicol-menu .inner ul li.last { border-right: none; } .fusion-multicol-menu .inner ul li.last a { padding-right: 0; /* LTR */ } .fusion-multicol-menu .inner ul li.expanded, .fusion-multicol-menu .inner ul li.leaf { float: left; /* LTR */ list-style-image: none; margin-left: 50px; /* LTR */ } .fusion-multicol-menu .inner ul.menu li.first { margin-left: 0; /* LTR */ } .fusion-multicol-menu .inner ul li.expanded li.leaf { float: none; margin-left: 0; /* LTR */ } .fusion-multicol-menu .inner ul li.expanded ul { display: block; margin-left: 0; /* LTR */ } .fusion-multicol-menu .inner ul li.expanded ul li { border: none; margin-left: 0; /* LTR */ text-align: left; /* LTR */ } .fusion-multicol-menu .inner ul.menu li ul.menu li { font-weight: normal; } /* Split list across multiple columns */ .fusion-2-col-list .inner .item-list ul li, .fusion-2-col-list .inner ul.menu li { float: left; /* LTR */ width: 50%; } .fusion-3-col-list .inner .item-list ul li, .fusion-3-col-list .inner ul.menu li { float: left; /* LTR */ width: 33%; } .fusion-2-col-list .inner .item-list ul.pager li, .fusion-3-col-list .inner .item-list ul.pager li { float: none; width: auto; } /* List with bottom border Fixes a common issue when list items have bottom borders and appear to be doubled when nested lists end and begin. This removes the extra border-bottom */ .fusion-list-bottom-border .inner ul li { list-style: none; list-style-type: none; list-style-image: none; } .fusion-list-bottom-border .inner ul li, .fusion-list-bottom-border .view-content div.views-row { padding: 0 0 0 10px; /* LTR */ border-bottom-style: solid; border-bottom-width: 1px; line-height: 216.7%; /* 26px */ } .fusion-list-bottom-border .inner ul { margin: 0; } .fusion-list-bottom-border .inner ul li ul { border-bottom-style: solid; border-bottom-width: 1px; } .fusion-list-bottom-border .inner ul li ul li.last { border-bottom-style: solid; border-bottom-width: 1px; margin-bottom: -1px; margin-top: -1px; } /*Andrew */ #views_slideshow_singleframe_pager_slideshow-page_2 .pager-item { display:block; } #views_slideshow_singleframe_pager_slideshow-page_2 { position:absolute; right:0; top:0; } #header-group-wrapper { background-color:#92bbe9; } #main-wrapper { background-color:#F3F3F3; background-image:url('http://10.0.1.151/sites/all/themes/fusion/fusion_core/images/backgroundmain.jpg'); background-repeat:no-repeat; background-attachment: fixed; width: auto; } /.front { /background-color:#F3F3F3; /background-image:url('http://10.0.1.151/sites/all/themes/fusion/fusion_core/images/background.jpg'); /background-repeat:no-repeat; /background-attachment: fixed; /width: auto; /} #views_slideshow_singleframe_pager_slideshow-page_2 div a img { top:0px; height:60px; width:80px; padding-right:10px; padding-bottom:19px; } #mycontent{ width: 720px; } #block-views-new_products-block_1{ height:200px; } /* List with no bullet and extra padding This is a common style for menus, which removes the bullet and adds more vertical padding for a simple list style */ .fusion-list-vertical-spacing .inner ul, .fusion-list-vertical-spacing div.views-row-first { margin-left: 0; margin-top: 10px; } .fusion-list-vertical-spacing .inner ul li, .fusion-list-vertical-spacing div.views-row { line-height: 133.3%; /* 16px/12px */ margin-bottom: 10px; padding: 0; } .fusion-list-vertical-spacing .inner ul li { list-style: none; list-style-image: none; list-style-type: none; } .fusion-list-vertical-spacing .inner ul li ul { margin-left: 10px; /* LTR */ } /* Bold all links */ .fusion-bold-links .inner a { font-weight: bold; } /* Float imagefield images left and add margin */ .fusion-float-imagefield-left .field-type-filefield, .fusion-float-imagefield-left .image-insert, .fusion-float-imagefield-left .imagecache { float: left; /* LTR */ margin: 0 15px 15px 0; /* LTR */ } /* Clear float on new Views item so each row drops to a new line */ .fusion-float-imagefield-left .views-row { clear: left; /* LTR */ } /* Float imagefield images right and add margin */ .fusion-float-imagefield-right .field-type-filefield, .fusion-float-imagefield-right .image-insert .fusion-float-imagefield-right .imagecache { float: right; /* LTR */ margin: 0 0 15px 15px; /* LTR */ } /* Clear float on new Views item so each row drops to a new line */ .fusion-float-imagefield-right .views-row { clear: right; /* LTR */ } /* Superfish: all menus */ .sf-menu li { list-style: none; list-style-image: none; list-style-type: none; } /* Superfish: vertical menus */ .superfish-vertical { position: relative; z-index: 9; } ul.sf-vertical { background: #fafafa; margin: 0; width: 100%; } ul.sf-vertical li { border-bottom: 1px solid #ccc; font-weight: bold; line-height: 200%; /* 24px */ padding: 0; width: 100%; } ul.sf-vertical li a:link, ul.sf-vertical li a:visited, ul.sf-vertical li .nolink { margin-left: 10px; padding: 2px; } ul.sf-vertical li a:hover, ul.sf-vertical li a.active { text-decoration: underline; } ul.sf-vertical li ul { background: #fafafa; border-top: 1px solid #ccc; margin-left: 0; width: 150px; } ul.sf-vertical li ul li.last { border-top: 1px solid #ccc; margin-bottom: -1px; margin-top: -1px; } ul.sf-vertical li ul { border-top: none; padding: 4px 0; } ul.sf-vertical li ul li { border-bottom: none; line-height: 150%; /* 24px */ } ul.sf-vertical li ul li.last { border-top: none; } ul.sf-vertical li ul li ul { margin-top: -4px; } /* Pagers -------------------------------------------------------------- */ ul.pager { margin: 20px 0; } ul.pager li { margin: 0; white-space: nowrap; } ul.pager a, ul.pager li.pager-current { border-style: solid; border-width: 1px; padding: 3px 6px 2px 6px; text-decoration: none; } ul.pager a:link, ul.pager a:visited { color: inherit; } ul.pager a:hover, ul.pager a:active, ul.pager a:focus { border-style: solid; border-width: 1px; } ul.pager span.pager-ellipsis { padding: 0 4px; } .item-list .pager li { padding: 0; } /* Forms /-------------------------------------------------------------- */ /* defaults for all text fields */ .form-text { padding: 2px; } /* defaults for all form buttons */ form input.form-submit { cursor: pointer; font-weight: bold; margin: 2px; padding: 3px 5px; } form input.form-submit:hover { cursor: pointer; } fieldset { margin: 15px 0; padding: 10px; } html.js fieldset.collapsed { margin-bottom: 15px; } /* limit width of form inputs */ textarea, .form-item input, .form-item select, #content-region input.form-text { max-width: 95%; } html.js textarea { max-width: 100%; } /* adjust for collapsible fieldset differences */ fieldset.collapsible .resizable-textarea textarea { max-width: 101.5%; } fieldset.collapsible .resizable-textarea .grippie { width: 101%; } /* keep admin pages visible */ .page-admin #main-content-inner .nested, .page-admin #content-group, .page-admin #content-region, .page-admin #content-inner { margin-bottom: 1.5em; overflow: visible; } /* keep admin form elements on top */ .page-admin .content-inner-inner { z-index: 10; } /* theme settings form field width limit */ form#system-theme-settings select, form#system-theme-settings input.form-text { max-width: 95%; } /* keep theme select form visible */ #system-themes-form { position: relative; z-index: 1; } /* keep theme switcher visible */ .form-item select#edit-theme { max-width: none; } /* keep admin columns from dropping under */ div.admin .left, div.admin .right { margin-left: 1%; margin-right: 1%; } /* region labels on block admin page */ .block-region { background-color: #F3F3F3; border: 3px dashed #CCCCCC; color: #555555; font-weight: bold; margin: 1px; padding: 3px; text-align: center; text-shadow: 1px 1px #FDFDFD; text-transform: uppercase; -moz-border-radius: 5px; -webkit-border-radius: 5px; } /* User Login Form /-------------------------------------------------------------- */ /* remove centering on login form */ #user-login-form { text-align: left; /* LTR */ } #user-login-form .item-list { margin-top: 1em; } #user-login-form .item-list ul { margin-left: 0; /* LTR */ } /* remove list styling on login form */ #user-login-form div.item-list ul li { list-style-type: none; margin: 0; } /* adjust openid link (display set in openid.js) */ #user-login-form li.openid-link a, #user-login li.openid-link a { background-position: 0 0; padding: 0 0 0 20px; } /* User Login Form - Horizontal (Skinr selectable) /-------------------------------------------------------------- */ .fusion-horiz-login#block-user-0 { float: right; margin: 20px 0 10px 0; position: relative; } html.js .fusion-horiz-login#block-user-0 { margin-top: 10px; } .fusion-horiz-login#block-user-0 h2.title { display: none; } .fusion-horiz-login#block-user-0 #user-login-form div.form-item, .fusion-horiz-login#block-user-0 #user-login-form input.form-submit, .fusion-horiz-login#block-user-0 .item-list { float: left; margin: 0 10px 0 0; text-align: left; } --- chopped ```
where is my css coming from?
CC BY-SA 2.5
0
2011-01-27T00:02:11.353
2011-01-27T00:52:47.887
2011-01-27T00:18:40.203
405,015
591,547
[ "html", "css", "drupal" ]
4,811,803
1
null
null
6
3,257
Is it possible to force the display of grid lines on the chart with the dates for the extreme data points? I've tried almost every configuration of following Chart DateTimeAxis properties: `IntervalType`, `Interval`, `Minimum` and `Maximum` but I wasn't satisfied with the result. Setting properties `Minimum` and `Maximum` didn't solve the problem. For instance (`IntervalType="Days" , Interval="4" , Minimum="1/1/2010" , Maximum="1/31/2010"`): ![An example chart](https://i.stack.imgur.com/SMrP4.png) If I'm lucky I will generate some random data where only one extreme point will have the date with grid line. Does somebody have an idea how to solve the problem mentioned above? I added a bounty to this question since I really need a fast solution for this issue. I am binding a series of specific pairs to my chart and I'd like to display excactly those given DateTime values on the x-axis. Since these are usually dates like 6/30/11, 6/30/12 and so on, I can't use the Interval/IntervalType properties because adding 1 year or 365 days to 6/30/11 doesn't necessarily result in 6/30/12. So what I need to do is either disable the "automatic axis label generation" of the DateTime axis or use another axis type. LinearAxis doesn't work because it expects double values and CategoryAxis is not an option because it displays the axis labels between two tickmarks instead of underneath them. I am very grateful for any help! To be perfectly clear, here is what axis labels I need (taken from another chart component): ![enter image description here](https://i.stack.imgur.com/A4AsY.png) This is what I get so far with the Silverlight 4 Toolkit: ![enter image description here](https://i.stack.imgur.com/UfZtM.png) €: I also opened a [thread](http://forums.silverlight.net/t/234753.aspx/1?Show%20specific%20dates%20on%20DateTimeAxis) in the official Silverlight Toolkit Support Forums.
How to force displaying specific dates on DateTimeAxis
CC BY-SA 3.0
0
2011-01-27T00:32:33.447
2014-04-25T07:34:05.267
2014-04-25T07:34:05.267
1,537,726
562,607
[ "c#", "silverlight", "windows-phone-7", "charts" ]
4,812,199
1
4,812,296
null
2
2,167
It is hard to put this problem into words, but a real world example will help. If you look at the iTunes app, it appears to have a `NSSplitView` for the `Sidebar | Content` split, and a nested `NSSplitView` for the source list and artwork panel. ![enter image description here](https://i.stack.imgur.com/XzGID.png) ======> ![enter image description here](https://i.stack.imgur.com/a3Lki.png) When you drag the divider to make the sidebar thinner, the artwork view (the bottom half of the inner `NSSplitView`) shortens to maintain the right aspect ratio. This is the behavior I am after. I have hooked up the outer `NSSplitView`'s `delegate` to point to the sideBarController so I can get the sizing changes and resize the lower portion of the split view programatically. that is, when I change the sidebars, width, the sidebar panels adjust their size accordingly. The problem I am having issues in attacking is how to resize the sidebar width when the nested `NSSplitView`'s height is altered. I originally tried to find ways to make this inner splitview's divider non-draggable, but could not find any way to do that. The way I have it setup now is to set the inner scrollview's delegate to be the windowController that owns the main splitview, then do a calculation on the height to alter the width of the info panel. Of course, altering ones size causes the other splitview to alter its size, which aters the originals size again and a endless loop is created. I could add flags and timers to try and work this out, but already it seems like I am going agains the grain here to achieve this functionality. How can I properly constrain the nested splitview panel to its parents width or more generally,
NSSplitView subview size programmatically constrained to container NSSplitView's size
CC BY-SA 2.5
0
2011-01-27T02:44:58.750
2011-01-27T02:58:06.540
null
null
69,634
[ "cocoa", "nsview", "resize", "nssplitview" ]
4,812,395
1
4,812,514
null
0
119
I borrowed Css Globe's easy slider, but I modified it to be laid out on the page. ``` /* numeric controls */ ol#controls{ margin:0.2em 1em; padding:0; height:16px; float:right; font-size:x-small; font-family: Arial, Verdana, Default; font-weight:normal; } ol#controls li{ padding:0; float:left; list-style:none; height:16px; width:20px; background:yellow; margin:10px; } ol#controls li a{ height:16px; line-height:18px; border:1px solid #ccc; background:#FFFFFF; color:#555; padding:0 5px; text-decoration:none; float:right; } ol#controls li.current a{ background:#736357; color:#fff; } ol#controls li a:focus, #prevBtn a:focus, #nextBtn a:focus{outline:none;} ``` I couldn't figure it out - IE7/8 slideshow navi (1,2,3,4) is spread widely when they should be arranged in close order to each other. See the example where they are spread widely. ![enter image description here](https://i.stack.imgur.com/W8ZGW.png) Any idea why it is behaving weirdly? Thank you!
Have issue with IE bug - CSS
CC BY-SA 2.5
null
2011-01-27T03:18:49.430
2011-01-27T04:23:34.567
2011-01-27T04:23:34.567
524,666
524,666
[ "html", "css", "internet-explorer" ]
4,812,554
1
null
null
1
340
![enter image description here](https://i.stack.imgur.com/g6VH3.jpg) How to get above thing in my application? What is this? I don't know what we call this type of thing can any one guide me for this and the technical term of this? Thanks in advance..
How to achieve this in my iPhone/iPad application?
CC BY-SA 3.0
0
2011-01-27T03:52:56.363
2012-05-31T07:20:06.980
2012-05-31T07:20:06.980
67,097
532,445
[ "iphone", "objective-c", "xcode", "ipad" ]
4,812,787
1
4,929,903
null
0
157
![enter image description here](https://i.stack.imgur.com/23Vs2.png) i am very new to .net, i just wanted to know how to make an UI of this sort? which controls do i need to use to make the UI of above sort. if not can i know in WPF is it possible if so how?.. Thanks
How to implement this control in .net
CC BY-SA 2.5
null
2011-01-27T04:34:58.713
2011-02-08T05:27:52.360
2011-01-27T09:27:58.577
164,683
164,683
[ ".net", "wpf", "silverlight", "listview", "silverlightcontrols" ]
4,813,336
1
4,813,671
null
5
13,575
java.lang.UnsatisfiedLinkError I'm using the hello-jni example, and for whatever reason, I'm getting a java.lang.UnsatisfiedLinkError when I try to call the hello-jni library. Any ideas why? Do I have to set my path somewhere? in HelloJni.java: ``` public native String stringFromJNI(); ``` and ``` static { System.loadLibrary("hello-jni"); } ``` in hello-jni.c: ``` jstring Java_com_bdunlay_hellojni_HelloJni_stringFromJNI( JNIEnv* env, jobject thiz ) { return (*env)->NewStringUTF(env, "Hello from JNI !"); } ``` ![exception trace](https://i.stack.imgur.com/fOoMd.png) the .so file is... project_root/libs/armeabi/libhello-jni.so
java.lang.UnsatisfiedLinkError
CC BY-SA 2.5
null
2011-01-27T06:18:52.470
2014-12-08T03:48:04.950
2011-01-27T06:49:34.707
387,064
387,064
[ "android", "android-ndk" ]
4,813,514
1
4,813,622
null
0
674
HI, I've a JLIST and assigned it a cellRenderer. but i was not able select element in list. Actually it is selected but visually we can not see that it is selected means i was not able to see which item is selected in list. Screen shot of my list: ![enter image description here](https://i.stack.imgur.com/gKdSP.png) and what is expected is ![enter image description here](https://i.stack.imgur.com/Mp3H3.png) The second screen shot is without CellRenderer. But when i add CellRenderer i was not able to see the selected item in list. is it normal behaviour that when you add CellRenderer to list. what am i doing wrong ??? this is my CellRenderer class: ``` public class ContactsRender extends JLabel implements ListCellRenderer { private static final long serialVersionUID = 1L; ImageIcon img; public ContactsRender(){ setOpaque(true); setIconTextGap(12); setBackground(Color.WHITE); setForeground(Color.black); } @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if(value != null){ User user = (User) value; String pres = user.getPresence().toLowerCase(); if(pres.contains("unavailable")){ img = new ImageIcon("res/offline.jpg"); } else { img = new ImageIcon("res/online.jpg"); } setText(user.getName()); setIcon(img); return this; } return null; } ```
List selection is not happening in swing
CC BY-SA 2.5
null
2011-01-27T06:46:53.697
2011-01-27T07:17:05.750
2011-01-27T07:10:21.063
559,070
559,070
[ "java", "swing", "selection", "jlist" ]
4,813,748
1
null
null
0
4,263
i retrieved data from mysql table into html page i.e this is gives me the output ![enter image description here](https://i.stack.imgur.com/26Jkz.png) assume that checkbox of id 1 is checked and retrieved from mysql table. Now what i want to do is that when i checked the remaing two checkbox into this table and a function is called to ajax which goes to php page and update the value of checked field according to the given id (i.e 2 and 3 in this case). Not refreshing the whole page nor updating the whole record just the value of check box. i am new to ajax so any help would be greatly appreciated.
how to update and post the value of checkbox from ajax call
CC BY-SA 2.5
null
2011-01-27T07:28:43.200
2018-01-19T05:25:27.997
null
null
501,751
[ "php", "javascript", "ajax" ]
4,814,145
1
4,814,184
null
2
862
My question is pretty simple, I've a device running on WinCE. This device as an additional Flash Disk device, so where should I deploy the config and exe files? On Flash Disk or in %PROGRAM FILES% ? Moreover, I've a XML setting file added as "New Element", so it appears in the Properties section (see screenshot), how can I deploy this file on my device (by specifying the path?) ![servers.xml](https://i.stack.imgur.com/RuibF.jpg) Should I use a resource file instead? Thanks.
Where deploy config file and exe files?
CC BY-SA 2.5
null
2011-01-27T08:29:20.230
2011-01-27T09:20:31.190
2011-01-27T08:30:39.810
41,956
466,227
[ "c#", "visual-studio-2008", "deployment", "compact-framework", "windows-ce" ]
4,814,298
1
null
null
0
1,559
I've isolated the checkbox grid from [this example of ExtJS grids](http://dev.sencha.com/deploy/dev/examples/grid/grid-plugins.js) into the following code. It shows the grid with the headers but not the data: ![enter image description here](https://i.stack.imgur.com/HpU1V.png) Firebug shows no Javascript errors. ``` Ext.onReady(function(){ Ext.QuickTips.init(); var xg = Ext.grid; var reader = new Ext.data.ArrayReader({}, [ {name: 'company'}, {name: 'price', type: 'float'}, {name: 'change', type: 'float'}, {name: 'pctChange', type: 'float'}, {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}, {name: 'industry'}, {name: 'desc'} ]); var sm = new xg.CheckboxSelectionModel(); var grid2 = new xg.GridPanel({ store: new Ext.data.Store({ reader: reader, data: xg.dummyData }), cm: new xg.ColumnModel({ defaults: { width: 120, sortable: true }, columns: [ sm, {id:'company',header: "Company", width: 200, dataIndex: 'company'}, {header: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'}, {header: "Change", dataIndex: 'change'}, {header: "% Change", dataIndex: 'pctChange'}, {header: "Last Updated", width: 135, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} ] }), sm: sm, columnLines: true, width:800, height:300, frame:true, title:'Framed with Checkbox Selection and Horizontal Scrolling', iconCls:'icon-grid', renderTo: document.body }); Ext.grid.dummyData = [ ['3m Co',71.72,0.02,0.03,'9/1 12:00am', 'Manufacturing'], ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am', 'Manufacturing'], ['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am', 'Manufacturing'], ['American Express Company',52.55,0.01,0.02,'9/1 12:00am', 'Finance'], ['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am', 'Services'], ['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am', 'Services'], ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am', 'Manufacturing'], ['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am', 'Services'], ['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am', 'Finance'], ['E.I. du Pont de Nemours and Company',40.48,0.51,1.28,'9/1 12:00am', 'Manufacturing'], ['Exxon Mobil Corp',68.1,-0.43,-0.64,'9/1 12:00am', 'Manufacturing'], ['General Electric Company',34.14,-0.08,-0.23,'9/1 12:00am', 'Manufacturing'], ['General Motors Corporation',30.27,1.09,3.74,'9/1 12:00am', 'Automotive'], ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am', 'Computer'], ['Honeywell Intl Inc',38.77,0.05,0.13,'9/1 12:00am', 'Manufacturing'], ['Intel Corporation',19.88,0.31,1.58,'9/1 12:00am', 'Computer'], ['International Business Machines',81.41,0.44,0.54,'9/1 12:00am', 'Computer'], ['Johnson & Johnson',64.72,0.06,0.09,'9/1 12:00am', 'Medical'], ['JP Morgan & Chase & Co',45.73,0.07,0.15,'9/1 12:00am', 'Finance'], ['McDonald\'s Corporation',36.76,0.86,2.40,'9/1 12:00am', 'Food'], ['Merck & Co., Inc.',40.96,0.41,1.01,'9/1 12:00am', 'Medical'], ['Microsoft Corporation',25.84,0.14,0.54,'9/1 12:00am', 'Computer'], ['Pfizer Inc',27.96,0.4,1.45,'9/1 12:00am', 'Services', 'Medical'], ['The Coca-Cola Company',45.07,0.26,0.58,'9/1 12:00am', 'Food'], ['The Home Depot, Inc.',34.64,0.35,1.02,'9/1 12:00am', 'Retail'], ['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am', 'Manufacturing'], ['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am', 'Computer'], ['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am', 'Services'], ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am', 'Retail'], ['Walt Disney Company (The) (Holding Company)',29.89,0.24,0.81,'9/1 12:00am', 'Services'] ]; }); ```
Why is the data in this ExtJS grid not showing?
CC BY-SA 2.5
null
2011-01-27T08:51:52.973
2011-06-18T11:47:18.050
null
null
4,639
[ "javascript", "extjs" ]
4,814,318
1
4,817,951
null
8
2,286
I'm currently implementing something with Python and matplotlib. I know how to draw polygons and also how to fill them, but how do I fill everything the interior of a polygon? To be clearer, I'd like to modify the result below, obtained using `axhspan`'s and `axvspan`'s, by clipping the horizontal and vertical red lines so as to obtain a red rectangle (outside which everything is hatched as it is now): ![enter image description here](https://i.stack.imgur.com/GN0Qs.png)
Filling complements of areas with matplotlib
CC BY-SA 2.5
0
2011-01-27T08:54:37.483
2011-01-27T22:06:24.247
null
null
284,696
[ "python", "matplotlib" ]
4,814,438
1
null
null
0
93
I want to login to my db but an exception occur which appears in the image bellow If there's no way to login how can I restore the data?? ![enter image description here](https://i.stack.imgur.com/FPDGm.png) : check the configuration of my user ![enter image description here](https://i.stack.imgur.com/GxWhh.png)
Cannot login to my db
CC BY-SA 2.5
null
2011-01-27T09:09:26.353
2011-01-27T19:46:43.697
2011-01-27T10:20:08.720
2,067,571
2,067,571
[ "oracle", "exception", "authentication", "oracle11g" ]
4,814,436
1
4,814,624
null
0
137
I am fairly new to the iPhone app creating scene. I have viewed some of Apple's presentations about this and read a few pages in the iOS development center. I managed to display a list of values stored in a .plist in a table view. If you press an item you switch to the detail editing view and I was wondering if there is a way to use like the main table cell views used commonly in existing iOS applications like here: ![enter image description here](https://i.stack.imgur.com/wLW0T.jpg) Is there a way to use these toggle/select value table cell views or am I forced to create my own xib files? EXTRA: I tried to search for code examples on the apple website but could not really find one that implemented this sort of view. If anyone knows an example using this, please link me!
iPhone details edit views
CC BY-SA 2.5
null
2011-01-27T09:09:12.863
2011-01-27T12:18:43.393
null
null
230,719
[ "iphone", "objective-c", "ios4" ]
4,814,515
1
4,814,570
null
0
756
I have a centOS virtual machine with 3 virtual hosts. It worked fine until this moment when I lost access to the dns server. Now the hosts can't be resolved. Can any1 tell me if I can configure some static routes or something to the virtual hosts? Print screen with the httpd response: ![enter image description here](https://i.stack.imgur.com/PMyqP.png) P.S. I would prefere not to configure a DNS server since the old one will start tomorrow again.
Service httpd error
CC BY-SA 2.5
null
2011-01-27T09:19:01.253
2011-01-27T09:25:36.460
null
null
569,872
[ "linux", "dns", "centos", "apache" ]
4,814,625
1
null
null
1
513
I have two situations where I would want something like this. In my model, I have a `Message` which concerns either one or two `Persons`. Furthermore, the message has an association with two `Addresses`, i.e. a from `Address` and a to `Address`. In the first situation with the two `Persons`, I would like to specify an association between `Message` and `Person` multiplicity of 1---1..2 or specify two associations, one with 1---1 and the other with 1---0..1. However, I cannot (or don't know how to) set the multiplicity to two. I can imagine that it might be possible to set it to 1--* with a constraint set to maximum 2 (however I don't know how to do that). By adding the two associations I feel a bit weird when I look at the `Message` side because both associations have a 1 there which would indicate a `Person` should have two `Messages` related to it. I might want something like 0..1 on the `Message` side for both associations with an xor constraint on them or something, but I don't know if that is good practise or even possible in EF. ![I want to specify that it's max 2](https://i.stack.imgur.com/peVsJ.jpg) ![Now it looks like a Person has two different Messages](https://i.stack.imgur.com/FKNFW.jpg) ![Now it looks like a Person can have two or no Messages](https://i.stack.imgur.com/GNvh7.jpg) For the second situation, the problem is quite similar, except that there is always a from `Address` and always a to `Address`. Setting the multiplicity 1--* doesn't seem right to me. Here I would imagine there should definitely be two associations, a from and a to association (which happen to both go to the `Address` entity). This however results in the same problem on the `Message` side of having two 1's or two 0..1's. ![Here the Address has two Messages](https://i.stack.imgur.com/ZhOLG.jpg) ![Now the Address has zero to two Messages](https://i.stack.imgur.com/HdVws.jpg) So my question is, how do I model this correctly in an EDM? Thanks in advance. ## Update 1: To clarify the question, I will give a little background information on why I need such a model. I have to be able to create a message. In this message I have to specify whether it concerns one or two persons. Of these persons I specify the first name, last name and some other non-unique properties (two people can have the same name). I could dump all these properties in the `Message` entity (fname1, lname1, fname2, lname2), but that seems a bad idea. Hence the `Person` entity was born. However, this might look like a `Person` can be linked to many messages, but this is not the case. There can be two different persons with the same properties. There is no way of telling whether these persons are actually the same person in real life or not. In the case of the addresses, a similar argument holds. Two addresses can be spelled a bit differently, but if I write them on a letter and mail it, they will both arrive at the same location (e.g. sesamestreet or sesamestr.). So I don't have one `Address` entity connected to multiple `Messages`. Again, the only reason `Address` is a separate entity, is because I have two of em with exactly the same properties. ![Everything in message](https://i.stack.imgur.com/UJGAC.jpg) ![Message split up](https://i.stack.imgur.com/x9ifk.jpg) From a database design point of view this might not make sense, from a class diagram perspective it might make a bit more sense. I was under the impression that the EDM in EF should not be like a database design, but more like a domain model, so I hope I did the right thing. ## Update 2: I just thought of what I think might be the best way in this case. Because there is virtually no difference between `Person1` and `Person2` I feel like making the association between `Message` and `Person` 1..* acceptable. The fact that many means two will be something for lower layers to handle. In the address case, the from and to are quite different. They are both addresses, but I don't feel I can make em a list. I could split the from and to address into separate entities and let them inherit from `Address`. Then associate `Message` with each of the subclasses. It might seem a bit overkill, but you could reason that a from address might at some point have different requirements than a to address and hence different properties. ![The solution](https://i.stack.imgur.com/OveTW.jpg) I am not 100% happy though (especially with the address part). This solution might or might not be OK, but I feel like it avoids the core problem.
How do I model a multiplicity of 2 in EF
CC BY-SA 2.5
0
2011-01-27T09:30:59.447
2011-01-28T09:02:13.060
2011-01-28T09:02:13.060
210,336
210,336
[ "entity-framework", "entity-framework-4", "modeling", "ado.net-entity-data-model", "multiplicity" ]
4,814,935
1
4,815,011
null
2
10,054
I'm trying to get an ExtJS grid working that has checkboxes from which I can of rows/ids so I know which rows have been checked. I've used [this example from Sencha](http://dev.sencha.com/deploy/dev/examples/grid/grid-plugins.js) to get the following grid to display correctly with the selection checkboxes, but it doesn't show which rows have been checked, e.g. I will have a button that has a handler function and inside this I need to write something like: var rowIdsChecks = grid.getRowIdsChecked(); ``` var myData = [ [4, 'This is a whole bunch of text that is going to be word-wrapped inside this column.', 0.24, '2010-11-17 08:31:12'], [16, 'Computer2', 0.28, '2010-11-14 08:31:12'], [5, 'Network1', 0.02, '2010-11-12 08:31:12'], [1, 'Network2', 0.01, '2010-11-11 08:31:12'], [12, 'Other', 0.42, '2010-11-04 08:31:12'] ]; var myReader = new Ext.data.ArrayReader({}, [{ name: 'id', type: 'int' }, { name: 'object', type: 'object' }, { name: 'status', type: 'float' }, { name: 'lastChange', type: 'date', dateFormat: 'Y-m-d H:i:s' }]); var sm = new Ext.grid.CheckboxSelectionModel(); var grid = new Ext.grid.GridPanel({ region: 'center', style: 'margin: 10px', store: new Ext.data.Store({ data: myData, reader: myReader }), cm: new Ext.grid.ColumnModel({ defaults: { width: 120, sortable: true }, columns: [ sm, { header: 'ID', width: 50, sortable: true, dataIndex: 'id', hidden: false }, { header: 'Object', width: 120, sortable: true, dataIndex: 'object', renderer: columnWrap }, { header: 'Status', width: 90, sortable: true, dataIndex: 'status' }, { header: 'Last Updated', width: 120, sortable: true, renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s'), dataIndex: 'lastChange' }] }), sm: sm, viewConfig: { forceFit: true }, title: 'Computer Information', width: 500, autoHeight: true, frame: true, listeners: { 'rowdblclick': function(grid, index, rec){ var id = grid.getSelectionModel().getSelected().json[0]; go_to_page('edit_item', 'id=' + id); } } }); ``` # Solution: Thanks @jujule, this code works: ``` Ext.select('span#internal_link_001').on('click', function() { var selections = grid.getSelectionModel().getSelections(); console.log(selections); }); ``` and then you have the like this: ![enter image description here](https://i.stack.imgur.com/vbpKE.png)
How do I query my ExtJS grid to see which CheckboxSelectionModel() checkboxes are checked?
CC BY-SA 2.5
null
2011-01-27T10:01:39.647
2011-11-14T17:08:58.057
2011-01-27T10:30:26.383
4,639
4,639
[ "extjs", "checkbox", "grid" ]
4,815,072
1
4,815,090
null
4
3,299
I've a problem. I've a textblock and my text is cropped. It seems to appear only when the text is too long cause when the text is shorter, there is no problem. So there is my code : ``` <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <Grid.RowDefinitions> <RowDefinition Height="150" /> <RowDefinition Height="447*" /> </Grid.RowDefinitions> <Image Grid.Row="0" Source="{Binding TheContent.PathPicture}" /> <ScrollViewer Grid.Row="1"> <Grid> <TextBlock Text="{Binding TheContent.Text}" TextWrapping="Wrap" FontSize="24" /> </Grid> </ScrollViewer> </Grid> ``` Text is croping like this : ![enter image description here](https://i.stack.imgur.com/wOnLs.jpg) Is the only solution to summary my content ?
long text cropped in textblock
CC BY-SA 2.5
0
2011-01-27T10:15:20.317
2013-03-22T17:09:35.110
2011-01-27T12:53:19.083
480,462
480,462
[ "xaml", "windows-phone-7", "textblock" ]
4,815,434
1
4,815,473
null
1
261
When I tried to compile the following C++ program: ``` //Source: C++ How To Program, Sixth Edition #include <iostream> int main() { int a; int *aPtr; a=7; aPtr=&a; std::cout<<"The address of a is: "<<&a<<std::endl; std::cout<<"The value of aPtr is: "<<aPtr<<std::endl; std::cout<<"The value of a is: "<<a<<std::endl; std::cout<<"The value of *aPtr is: "<<*aPtr<<std::endl; std::cout<<"Showing that * and & are inverses of each" <<" other"<<std::endl; std::cout<<"&*aPtr= "<<&*aPtr<<std::endl; std::cout<<"*&aPtr= "<<*&aPtr<std::endl; return 0; } ``` I got the following error: ![enter image description here](https://i.stack.imgur.com/7wHPp.png) Any ideas on that? Thanks.
C++ pointer error
CC BY-SA 2.5
0
2011-01-27T10:58:57.160
2011-01-27T11:33:46.970
null
null
588,855
[ "c++", "pointers" ]
4,815,526
1
4,815,905
null
0
354
I've customized a UITableViewCell's contentView to have 2 labels. However, when I select/highlight the cell the contentView seems to duplicate itself. Here's an example (before): ![enter image description here](https://i.stack.imgur.com/TZnHn.png) After (highlighted): ![enter image description here](https://i.stack.imgur.com/ZSn29.png) Here's my code for the cell: ``` - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; UILabel *mainLabel = [[[UILabel alloc] init] autorelease]; UILabel *detailedLabel = [[[UILabel alloc] init] autorelease]; [mainLabel setFont:[UIFont boldSystemFontOfSize:18.0f]]; [detailedLabel setFont:[UIFont systemFontOfSize:13.0f]]; mainLabel.frame = CGRectMake(51, 5, 0, 0); mainLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; detailedLabel.frame = CGRectMake(51, 23, 0, 0); detailedLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; NSString *text = [documents objectAtIndex:indexPath.row]; mainLabel.text = [text stringByReplacingOccurrencesOfString:[NSString stringWithFormat:@".%@", [text pathExtension]] withString:@""]; NSString *extDescription = [self extensionDescriptionFromExtension:[text pathExtension]]; NSString *fileSize = [self getFileSize:[NSString stringWithFormat:@"%@/Documents/%@", documentsDirectory, text]]; detailedLabel.text = [NSString stringWithFormat:@"%@ - %@", fileSize, extDescription]; cell.imageView.image = [UIImage imageNamed:@"txtIcon.png"]; [cell.contentView addSubview:mainLabel]; [cell.contentView addSubview:detailedLabel]; return cell; } ``` Any help appreciated.
UITableViewCell Highlighted - Content View duplicating
CC BY-SA 2.5
null
2011-01-27T11:06:35.723
2011-01-27T11:45:32.787
null
null
457,088
[ "iphone", "objective-c", "uitableview", "duplicates" ]
4,815,709
1
18,072,907
null
2
10,130
I want to create a coverage map like the map that appears when you try to use Streetview (see below). What is the best way to go about creating such a map. (assuming that i already have my data in lat/lng points). ![enter image description here](https://i.stack.imgur.com/7l5A5.jpg)
How to create a coverage map in Google Maps V3?
CC BY-SA 2.5
null
2011-01-27T11:25:32.307
2014-04-07T20:50:26.163
null
null
284,272
[ "php", "google-maps-api-3" ]
4,815,762
1
4,815,820
null
13
4,548
If I bind `Text` in a `TextBox` to a float Property then the displayed text doesn't honor the system decimal (dot or comma). Instead it always displays a dot ('.'). But if I display the value in a `MessageBox` (using ToString()) then the correct System Decimal is used. ![enter image description here](https://i.stack.imgur.com/IKxcj.png) ``` <StackPanel> <TextBox Name="floatTextBox" Text="{Binding FloatValue}" Width="75" Height="23" HorizontalAlignment="Left"/> <Button Name="displayValueButton" Content="Display value" Width="75" Height="23" HorizontalAlignment="Left" Click="displayValueButton_Click"/> </StackPanel> ``` ``` public MainWindow() { InitializeComponent(); FloatValue = 1.234f; this.DataContext = this; } public float FloatValue { get; set; } private void displayValueButton_Click(object sender, RoutedEventArgs e) { MessageBox.Show(FloatValue.ToString()); } ``` As of now, I've solved this with a Converter that replaces dot with the System Decimal (which works) but what's the reason that this is neccessary? Is this by design and is there an easier way to solve this? (in case someone else has the same problem) ``` public class SystemDecimalConverter : IValueConverter { private char m_systemDecimal = '#'; public SystemDecimalConverter() { m_systemDecimal = GetSystemDecimal(); } object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture) { return value.ToString().Replace('.', m_systemDecimal); } object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return value.ToString().Replace(m_systemDecimal, '.'); } public static char GetSystemDecimal() { return string.Format("{0}", 1.1f)[1]; } } ```
TextBox doesn't honor System Decimal (Dot or Comma)
CC BY-SA 2.5
0
2011-01-27T11:32:06.313
2011-01-27T17:59:13.097
2011-01-27T17:59:13.097
318,425
318,425
[ "c#", "wpf", "textbox", "wpf-controls", "culture" ]
4,815,885
1
4,815,951
null
2
185
I’m programing in Java Netbeans and I'm making an application for a touch screen. I have a table, I would like if it’s possible to click in a cell of the table and go to another jpanel? Look the example: ![table example](https://i.stack.imgur.com/2aKto.jpg) If a click in the John’s line and the Form complete column, I need to open the jpanel where is the John’s form. Is it possible to do that?
Now the position in a table and open a jpanel
CC BY-SA 3.0
null
2011-01-27T11:43:38.673
2017-04-25T09:02:46.397
2017-04-25T09:02:46.397
4,370,109
452,011
[ "java", "swing", "position" ]
4,816,297
1
4,816,346
null
9
8,188
I'm using to draw a diagram, and I want to highlight objects when the user performs a click on them. It is easy when a figure is fully contained in a rectangle: ``` if (figure.Bounds.Contains(p)) // bounds is a rectangle ``` But I don't know how to manage it if the figure is a complex `GraphicsPath`. I have defined the following `GraphicsPath` for the figure (the green circle). ![GraphicsPath](https://i.stack.imgur.com/Bjem4.png) I want to highlight the figure when the user click on it. `Point``GraphicsPath` Any ideas? Thanks in advance.
How to know if a GraphicsPath contains a point in C#
CC BY-SA 2.5
0
2011-01-27T12:29:42.347
2015-12-20T05:01:10.957
2011-01-27T12:37:17.177
402,081
402,081
[ "c#", ".net", "drawing", "system.drawing" ]
4,816,349
1
4,872,211
null
4
863
I have three tables `Lot`, `Sale` and `Company`. I've attached a digram below. ![enter image description here](https://i.stack.imgur.com/s5xel.jpg) I need to fetch a result set of 10 items from these tables. I'm looking for the the following fields — company_name, the average quantity, the maximum price, the minimum price the average price, the number of sales. I've managed to query them like this: ``` SELECT company_id , AVG(quantity) , MAX(price) , MIN(price) , AVG(price) , COUNT(sale_id) FROM lots GROUP BY company_id ORDER BY AVG(quantity) ASC LIMIT 10; ``` I also needed the average price-per-unit grouped by the company and the week number. (I need this as a comma-separated way so that i can pass it to the Google Chart API. Since one cant use `SUM` inside a `GROUP_CONCAT` in SQLite, I had to use this fugly inline view.) ``` SELECT company_id , GROUP_CONCAT(price_per_unit) FROM ( SELECT company_id , sales.week , SUM(price * quantity) / SUM(quantity) AS price_per_unit FROM lots JOIN sales ON lots.sale_id = sales.id GROUP BY company_id , sales.week ORDER BY company_id ASC , sales.week ASC ) GROUP BY company_id; ``` Coming from an SQL background, I find a little hard to use the ORM model to fetch the data. Could someone show me how I can fetch this data using the Rails ORM way? I've tried to be as verbose as possible. My apologies for the omissions, if any. Thanks Found a way to join the two queries. ``` SELECT lots.company_id , AVG(quantity) , MAX(price) , MIN(price) , AVG(price) , COUNT(sale_id) , x.price_per_unit FROM lots JOIN ( SELECT company_id , GROUP_CONCAT(price_per_unit) AS price_per_unit FROM ( SELECT company_id , sales.week , SUM(price * quantity) / SUM(quantity) AS price_per_unit FROM lots JOIN sales ON lots.sale_id = sales.id GROUP BY company_id , sales.week ORDER BY sales.week ASC ) GROUP BY company_id ) x ON lots.company_id = x.company_id GROUP BY lots.company_id ORDER BY AVG(quantity) ASC LIMIT 10; ```
Help with querying data from Rails
CC BY-SA 2.5
null
2011-01-27T12:35:17.843
2011-02-02T08:30:01.380
2011-01-27T12:57:18.720
11,530
304,151
[ "ruby-on-rails-3", "activerecord" ]
4,816,478
1
null
null
4
641
I'm creating a PHP framework which allows a PHP developer to create an ExtJS front end with PHP classes only, e.g. creating a grid looks like this: ``` $grid_import = new Backend_Layout_Grid('smart_worksheets'); $grid_import->set_width(1300); $grid_import->set_rows_selectable(true); $grid_import->set_title(__('backend.application.import.grid.title')); $grid_import->set_margin('10px'); //CSS syntax, e.g. also "10px 0 0 0" $grid_import->add_column(array('id_code'=>'name', 'label'=> __('backend.application.import.worksheetstoimport'), 'width'=>'300')); $grid_import->add_column(array('id_code'=>'kind', 'label'=> __('backend.application.import.kind'), 'width'=>'50')); $grid_import->add_column(array('id_code'=>'file_size', 'label'=> __('backend.application.import.sizebyte'), 'datatype' => 'int')); $grid_import->add_column(array('id_code'=>'when_file_copied', 'label'=> __('backend.application.import.whenfilecopied'), 'datatype' => 'datetime', 'width'=>'150')); $grid_import->add_column(array('id_code'=>'table_name', 'label'=> __('backend.application.import.mysqltablename'), 'width'=>'300')); $grid_import->add_column(array('id_code'=>'when_table_created', 'label'=> __('backend.application.import.whentablecreated'), 'width'=>'160')); $grid_import->add_column(array('id_code'=>'status', 'label'=> __('backend.application.import.status'), 'width'=>'300')); $grid_import->set_doubleclick_target_uri('backend/application/importmanager/single', 0); if (count($smart_worksheets) > 0) { $row_index = 0; foreach ($smart_worksheets as $smart_worksheet) { $show_row = array( 'name' => $smart_worksheet['name'], 'kind' => $smart_worksheet['kind'], 'file_size' => $smart_worksheet['file_size'], 'when_file_copied' => $smart_worksheet['when_file_copied'], 'table_name' => $smart_worksheet['table_name'], 'when_table_created' => __($smart_worksheet['when_table_created']), 'status' => __($smart_worksheet['status']) ); $grid_import->add_row($show_row); if(in_array($smart_worksheet['status'], array('backend.application.import.status.needtoimport', 'backend.application.import.status.needtoreimport'))) { $grid_import->add_row_format($row_index, Backend_Layout_Grid::ROW_FORMAT_RED); } if(in_array($smart_worksheet['status'], array('backend.application.import.status.isuptodate'))) { $grid_import->add_row_format($row_index, Backend_Layout_Grid::ROW_FORMAT_GREEN); } if(intval($smart_worksheet['file_size']) > 4000000 AND (in_array($smart_worksheet['kind'], array('XLS','XLSX')))) { $grid_import->add_row_format($row_index, Backend_Layout_Grid::ROW_FORMAT_GRAY); } $row_index++; } } Backend_Layout_Window::instance()->add_item($grid_import); ``` It works well so far, but since I am just outputting javascript code line-by-line, the more features I build into the class, the more complex the if/then logic gets in building the raw Javascript text, here is a which generates the Javascript code: ``` public function render_main_code_block() { $retval = ''; $retval .= $this->render_data_variable(); $retval .= $this->render_array_reader_block(); $retval .= $this->render_grid_panel_block(); if($this->rows_selectable) { $retval .= self::render_line("````}),"); $retval .= self::render_line("````sm: sm,"); } $retval .= self::render_line("````viewConfig: {"); if ($this->percentage_columns) { $retval .= self::render_line("``````forceFit: true,"); // true = percentage column width (add up to 100) } else { $retval .= self::render_line("``````forceFit: false,"); } $retval .= self::render_line("``````getRowClass: function(record, rowIndex, rp, ds){"); if (count($this->row_formats) > 0) { foreach ($this->row_formats as $row_index => $row_format) { $retval .= self::render_line("````````if(rowIndex == ".$row_index."){"); $retval .= self::render_line("``````````return '".$row_format."';"); $retval .= self::render_line("````````}"); } } $retval .= self::render_line("````````return '';"); $retval .= self::render_line("``````}"); $retval .= self::render_line("````},"); $retval .= self::render_line("````title: '$this->title',"); if ( ! is_null($this->width)) { $retval .= self::render_line("````width: $this->width,"); } $retval .= $this->render_double_click_handler(); $retval .= self::render_line("````autoHeight: true,"); $retval .= self::render_line("````frame: true"); $retval .= self::render_line("``});"); $retval .= self::render_line(""); $retval .= self::render_line("``replaceComponentContent(targetRegion, ".$this->script_variable_name.");"); $retval .= self::render_line("``".$this->script_variable_name.".getSelectionModel().selectFirstRow();"); // for word wrapping in columns $retval .= self::render_line("``function columnWrap(val){"); $retval .= self::render_line("````return '<div style=\"white-space:normal !important;\">'+ val +'</div>';"); $retval .= self::render_line("``}"); return $retval; } ``` Some particular issues which is starting to make this code too complex to maintain is: - ![enter image description here](https://i.stack.imgur.com/s2bXN.png) - So at some point I want to the way I create the Javascript. I currently see only , to create e.g. a `CodeFactory` class which contains e.g. `ExtJsVariable` to which I add objects which contain objects themselves recursively, the objects can be of type e.g. `simpleArray` or `anonymousFunction` etc, and then to create the code I would output `$codeFactory->render()` which would give me the code based on all of its internal objects: ![enter image description here](https://i.stack.imgur.com/frynx.png)
What is the most maintainable approach to generating Javascript/ExtJS code from PHP?
CC BY-SA 2.5
0
2011-01-27T12:46:15.777
2011-01-28T05:42:13.847
2011-01-27T12:52:03.857
4,639
4,639
[ "php", "javascript", "extjs", "code-generation" ]
4,816,539
1
null
null
1
79
I have an app code which was running successfully on iphone sdk 3.. but now i have changed to SDK 4.0 and the code gives error here is the error ![enter image description here](https://i.stack.imgur.com/ligkd.png) and my frameworks are ![enter image description here](https://i.stack.imgur.com/oUrqV.png) please help...
Build error after changing to SDK 4.0
CC BY-SA 2.5
null
2011-01-27T12:53:55.277
2011-01-28T04:40:29.840
2011-01-28T04:40:29.840
426,006
426,006
[ "iphone", "xcode", "ios4" ]
4,816,543
1
null
null
0
2,372
I would like to trigger browsers file upload window when i click on custom button.Its should show same like below in the image.![enter image description here](https://i.stack.imgur.com/qeZzH.png)
how to trigger file browse when i click on image/button
CC BY-SA 2.5
null
2011-01-27T12:54:27.413
2012-12-12T08:35:58.593
null
null
457,348
[ "php", "javascript", "html" ]
4,816,705
1
null
null
3
1,326
I have a specific question. I sent out iCalendar files by the library [iCal4j](http://wiki.modularity.net.au/ical4j/index.php?title=Main_Page) but now I need that the receiver of the iCalendar can't propose a new time. So the button nee te bo disabled. When I sent out a meeting request from 2010 and disable the option 'Allow New Time Proposals' then the property is set to . This option seems to work with outlook 2010 but isn't accept by outlook 2007. Does someone have an idea for a other property setting? ![enter image description here](https://i.stack.imgur.com/3bIRo.png) iCal4j code: ``` //add property so ms outlook knows that the users can't propose a new time XProperty xprop = new XProperty("X-MICROSOFT-DISALLOW-COUNTER","TRUE"); vEvent.getProperties().add(xprop); ``` It seems that outlook 2007 also use X-MICROSOFT-DISALLOW-COUNTER:TRUE to disable the button, but unfortunately this isn't accepted on the client's exchange server.
Disable outlook "propose new time" button by iCalendar vEvent
CC BY-SA 2.5
null
2011-01-27T13:09:00.637
2011-01-27T13:34:36.223
2011-01-27T13:34:36.223
193,850
193,850
[ "java", "outlook", "ms-office", "icalendar", "ical4j" ]
4,817,012
1
4,818,041
null
1
4,699
I have a one `Gridview` (Gridview1) and one `Button` (Delete). And AVUKAT `table` (Columns--> HESAP, MUSTERI, AVUKAT) My `Gridview` code is ``` <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="GridviewDataSource" ForeColor="#333333" GridLines="None" Width="329px" AllowSorting="True" > ``` My `DataSource` code is ``` <asp:SqlDataSource ID="GridviewDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>" SelectCommand="SELECT * FROM [AVUKAT] ORDER BY [MUSTERI]"> ``` And one Button (Delete) What i want is, when i show the data in Gridview all data have a checkbox (Like this picture) ![enter image description here](https://i.stack.imgur.com/AwZAE.png) And then, When i click `Delete Button`, deleting all checked datas on gridview and table. How can i do that? Best Regards, Soner
All Data have checkbox on Gridview for Delete
CC BY-SA 2.5
null
2011-01-27T13:36:34.153
2011-01-27T15:07:40.573
null
null
447,156
[ "c#", ".net", "asp.net", "gridview", "datasource" ]
4,817,051
1
4,817,106
null
53
73,963
Here is what my solution is looking like at the moment: ![enter image description here](https://i.stack.imgur.com/9OpOZ.jpg) In the Tutomentor.Branding project, I'd like to save branding information in the App.config file, like names, colors, etc. In the Tutomentor.Data project, the App.config was created when I added an entity .edmx model file. Is this possible? Any recommendations? When deploying, will the output COMBINE these App.config files into a single one?
Can a class library have an App.config file?
CC BY-SA 2.5
0
2011-01-27T13:41:18.550
2019-08-23T09:59:21.827
null
null
null
[ "c#", "winforms", "app-config" ]
4,817,038
1
4,817,264
null
3
292
I've begun development on a web app, and I'm just now tackling some of the first front-end obstacles. I'll give you some details about the front-end first, just to make sure the context of my question is clear. **Below is a diagram, showing the different elements relevant to the question.* ![enter image description here](https://i.stack.imgur.com/7l9cZ.jpg) Each `Node` is draggable. If you would , please take a quick look at [http://labs.inversepenguin.com](http://labs.inversepenguin.com) to view a test `canvas` with one `node` active. `Node 2` 's position in Figure 2 has changed from it's location in Figure 1, resulting in an extra `link` being displayed. My goal is to have the newly created `link` appear the instant `node2` has been dragged the necessary distance... as opposed to say, after the user drops `node2`. --- > --- The desired function would consist of: - An algorithm to analyze the distance between `nodes` to determine how many `links` should be displayed.- Create/destroy `links` based upon results.- To position each resulting `link` appropriately; centered and evenly spaced. --- I was maybe thinking maybe having the function call itself at it's end, after an `if` checking to see if the user is "still dragging," but I'm new to programming and don't have a firm grasp on what's practical. Thanks in advance for any help!
How can I create a Javascript/Jquery algorithmic function that will calculate on load--and re-draw during mousedrag?
CC BY-SA 2.5
0
2011-01-27T13:40:27.840
2014-01-06T13:19:54.517
2011-01-27T16:20:56.193
null
371,525
[ "javascript", "jquery", "web-applications", "frontend" ]
4,817,219
1
4,817,848
null
2
722
I would like to draw a 3D [Superformula](http://en.wikipedia.org/wiki/Superformula) mesh but not sure how I should organize the faces(be them triangles or quads). I've installed octave and tried the sample code. I have no clue how Gnuplot's mesh() function works, but I imagine I would need something similar. The Wikipedia entry has a link to a [Processing demo](http://chamicewicz.com/p5/superformula3d/). I had a look at the source and noticed it only draws points. I tried to wrap that segment of code within [beginShape()](http://processing.org/reference/beginShape_.html)/endShape() calls but work the way I hoped. I also tried to check if the number of points is divisible by 3 or 4 and used TRIANGLES or QUADS, but this is not the right way to do this, as you can see below: ![SuperShape Processing](https://i.stack.imgur.com/4phB9.png) I imagine the vertices are in the right positions, but they need to be sorted to calls that would draw the faces using the vertex indices. I'm not fixed to a particular language at the moment, but my goal would be to have the vertices in an array, then push faces(3 or 4 points) using vertex indices. Any hints ? Here is the function used to get the points in the Processing sample code: ``` import toxi.geom.*; import controlP5.*; ControlP5 controlP5; ArrayList points = new ArrayList(); ArrayList faces = new ArrayList(); float a1=1,a2=1,b=1,xx,step = 0.05,yy,zz,n1=4,n2=12,n3=15,n4=15,r,raux1,r1,raux2,r2; int N_X = int(2*PI/step); int N_Y = int(PI/step); void setup() { size(800,800,P3D); //hint(ENABLE_DEPTH_SORT); controlP5 = new ControlP5(this); controlP5.addSlider("a1value",0,3,1,20,0,200,10); controlP5.addSlider("a2value",0,3,1,20,20,200,10); controlP5.addSlider("bvalue",0,3,1,20,40,200,10); controlP5.addSlider("n1value",0,20,8,20,60,200,10); controlP5.addSlider("n2value",0,5,0.5,20,80,200,10); controlP5.addSlider("n3value",0,5,0.5,20,100,200,10); controlP5.addSlider("n4value",0,20,8,20,120,200,10); controlP5.addSlider("stepvalue",0.02,0.9,0.05,20,140,200,10); controlP5.setAutoDraw(false); draw_super_formula(); } void draw() { background(0); fill(255); controlP5.draw(); lights(); translate(width / 2, height / 2, 0); rotateX(mouseY * 0.01f); rotateY(mouseX * 0.01f); // connect 4 points into quads: Vec3D pt; for(int x=0;x<N_X-1;x++) { for(int y=0;y<N_Y-1;y++) { beginShape(QUADS); pt = (Vec3D)points.get( x*N_Y + y ); vertex(pt.x,pt.y,pt.z); pt = (Vec3D)points.get( x*N_Y + y+1 ); vertex(pt.x,pt.y,pt.z); pt = (Vec3D)points.get( (x+1)*N_Y + y+1 ); vertex(pt.x,pt.y,pt.z); pt = (Vec3D)points.get( (x+1)*N_Y + y); vertex(pt.x,pt.y,pt.z); endShape(); } } } void vertex(Vec3D v) { vertex(v.x,v.y,v.z); } void draw_super_formula() { for(int i = points.size()-1; i>0;i--){ points.remove(i); } for(int x=0;x<N_X;x++) { float i = -PI + x*step; for(int y=0;y<N_Y;y++) { float j = -PI/2.0 + y*step; raux1=pow(abs(1/a1*abs(cos(n1*i/4))),n3)+pow(abs(1/a2*abs(sin(n1*i/4))),n4); r1=pow(abs(raux1),(-1/n2)); raux2=pow(abs(1/a1*abs(cos(n1*j/4))),n3)+pow(abs(1/a2*abs(sin(n1*j/4))),n4); r2=pow(abs(raux2),(-1/n2)); xx=r1*cos(i)*r2*cos(j)*100; yy=r1*sin(i)*r2*cos(j)*100; zz=r2*sin(j)*100; Vec3D test1 = new Vec3D(xx,yy,zz); points.add(test1); } } } void bvalue(float new_value){ b = new_value; draw_super_formula(); } void a1value(float new_value){ a1 = new_value; draw_super_formula(); } void a2value(float new_value){ a2 = new_value; draw_super_formula(); } void n1value(float new_value){ n1 = new_value; draw_super_formula(); } void n2value(float new_value){ n2 = new_value; draw_super_formula(); } void n3value(float new_value){ n3 = new_value; draw_super_formula(); } void n4value(float new_value){ n4 = new_value; draw_super_formula(); } void stepvalue(float new_value){ step = new_value; draw_super_formula(); println("% 3: "+(points.size()%3)); println("% 4: "+(points.size()%4)); } class F4{ int a,b,c,d; F4(int a,int b,int c,int d){ this.a = a; this.b = b; this.c = c; this.d = d; } } ``` @tim_hutton's solution is great, but it looks an index off, trying to figure out where that is. ![superformula issue](https://i.stack.imgur.com/dm3qn.png)
How can I draw a SuperShape3D as a mesh?
CC BY-SA 2.5
0
2011-01-27T13:59:04.990
2011-01-28T12:20:48.160
2011-01-28T12:20:48.160
89,766
89,766
[ "3d", "geometry", "computational-geometry", "mesh" ]
4,817,745
1
7,133,950
null
89
104,577
I've got a positioning problem with some elements, upon inspecting it IE8 Developer tools it shows me this: ![Where does offset come from?](https://i.stack.imgur.com/aQAdM.jpg) Now I'm pretty sure my problem is that 12 offset, but ? I can't find any mention of a CSS offset property. Do we need an Offset in addition to margin? Here is the code thats producing this: ``` <div id="wahoo" style="border: solid 1px black; height:100px;"> <asp:TextBox ID="inputBox" runat="server" /> <input id="btnDropDown" type="button" style="width:26px; height:26px; background-position: center center; border-left-color: buttonface; background-image: url(Images/WebResource.gif); border-bottom-color: buttonface; border-top-color: buttonface; background-repeat: no-repeat; border-right-color: buttonface;" tabindex="99" /> <div id="ListboxWrapper" style="display:none; position:absolute; onfocusout="this.style.display = 'none'""> <asp:ListBox ID="lstBoxCompany" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstBoxCompany_SelectedIndexChanged" style="z-index: 100;" Width="300px" /> </div> </div> ``` The element with the offset is `inputBox`
How do I get rid of an element's offset using CSS?
CC BY-SA 3.0
0
2011-01-27T14:42:26.977
2019-08-25T10:39:40.547
2011-08-20T19:04:11.590
42,106
436,028
[ "html", "css", "internet-explorer", "user-interface" ]
4,818,525
1
4,818,619
null
13
1,171
I'm experiencing something recently that is really annoying and I can't figure out why it's doing it. Not sure when it started, because I recently wiped my machine, so maybe its a recent update or maybe it's from a while ago. Either way, here is what's happening. When I'm declaring an anonymous function inline and start typing the "function() { ... }" part, the VS2010 intellisense comes up and replaces my lowercase function with its own capitalized "Function." I guess this is some static function in JavaScript or JScript or something else, but I dont know. Either way, its when I type the "()" that it assumes thats what I want. If I'm declaring a standalone function it isn't affected because I don't put the "()" after that, so it just leaves what I type. Here are some screen shots of what is happening. ![javascript intellisense](https://i.stack.imgur.com/01m7j.png)![enter image description here](https://i.stack.imgur.com/HsmuP.png) It is quite frustrating because I don't notice it each time and then, of course, the function doesn't execute. I also work in VS2008 each day and in 2008, both the "function" and "Function" are listed in the intellisense menu, but it defaults to the lowercase one so it doesn't affect me. Is there any way I can override the intellisense settings? Find a file and remove the "Function" one from the list because I'll never use it? Make it default back to the lowercase "function" choice? Any help would be great. Thanks! -Jorin
Visual Studio 2010 JavaScript Intellisense capitalizing the F in "function"
CC BY-SA 2.5
0
2011-01-27T15:49:25.890
2014-02-26T03:21:14.823
null
null
331,855
[ "javascript", "visual-studio-2010", "intellisense" ]
4,818,664
1
4,818,959
null
0
729
I need to add Facebook OpenGraph "like" buttons to an existing site that was not designed with this feature in mind. The problem is that the LIKE buttons fit in OK, but the comment widget is larger than its container, which is of a fixed size. Because all of the FB code happens in an Iframe, what are my options to control where it appears on my page? ![enter image description here](https://i.stack.imgur.com/6CqVC.png)
Positioning Facebook comment widget
CC BY-SA 2.5
null
2011-01-27T16:01:42.020
2011-03-17T22:52:49.617
null
null
12,579
[ "html", "css", "facebook" ]
4,818,757
1
null
null
0
669
When I made the following declarations: ``` int b; int c; int *b; int *c; ``` I got the following output when compiled: ![enter image description here](https://i.stack.imgur.com/52bx7.png) So, do we conclude here that when we declare a `pointer` variable, it is an ordinary varibale that can hold data on its own? In other words, a memory location that has an address and a value? I'm asking this since I want to try `pointer-to-pointer`? If I have `int **c' for example, how can I make it hold the following: And, is there `int ***c`? Thanks a lot.
C++ pointers - conflict declaration and pointer-to-pointer
CC BY-SA 2.5
null
2011-01-27T16:09:59.507
2011-01-27T16:37:49.790
null
null
588,855
[ "c++", "pointers", "declaration", "conflict" ]
4,818,878
1
null
null
8
4,890
Is there any way to make a WPF window transparent without losing the non-client area (borders, title bar, close/minimise/maximise buttons)? Setting 'AllowsTransparency' to 'true' requires that 'WindowStyle' be set to 'None' (as explained in [this answer](https://stackoverflow.com/questions/3254179/how-to-remove-the-non-client-area-of-a-wpf-window-without-using-allowtransparency)), which removes the non-client area. One of the WPF developers [blogged about how transparent windows work in WPF](http://blogs.msdn.com/b/dwayneneed/archive/2008/09/08/transparent-windows-in-wpf.aspx), and why it would have been difficult to implement support for non-client area transparency. > No matter what your window styles may suggest, transparent WPF windows do not have any visible non-client area. This is fine for many scenarios where the intent is to create a custom window shape, but it can be annoying for people who just want to "fade in" a normal window. A WPF-only solution, then, seems out of the question. Calling the native [SetLayeredWindowAttributes function](http://msdn.microsoft.com/en-us/library/ms633540(v=vs.85).aspx) and passing a WPF window's handle and LWA_ALPHA has no effect, as expected. The only other approach I can think of is hosting WPF content within a Win32 (or possibly WinForms) window. I suspect trying to do this will result in [airspace issues](http://msdn.microsoft.com/en-us/library/aa970688.aspx), however. > WPF layered windows have different capabilities on different operating systems ... WPF does not support transparency color keys, because WPF cannot guarantee to render the exact color you requested, particularly when rendering is hardware-accelerated. I'm not sure if I'm reading the above correctly, but it sounds like trying to host WPF content featuring transparency is not possible. Any ideas? ![Transparent Notepad2 Window](https://i.stack.imgur.com/gCX46.png)
WPF Window Transparency (including Non-Client Area)
CC BY-SA 2.5
0
2011-01-27T16:18:53.650
2020-08-05T16:12:56.050
2017-05-23T10:32:35.693
-1
532,233
[ "wpf", "transparency", "opacity" ]
4,818,921
1
null
null
0
122
``` <iframe src="http://google.com" height="650" width="350"></iframe> ``` ![enter image description here](https://i.stack.imgur.com/SPKxo.png) How to get rid of the inconsistent border colors?
Resizing iframe causes inconsistent border color
CC BY-SA 2.5
null
2011-01-27T16:22:23.163
2011-12-14T14:51:19.297
null
null
417,798
[ "iframe" ]
4,819,005
1
null
null
3
9,019
I have a problem with my Jquery Datatable. Basically I want to have a datatable like that: [Data table example](http://www.datatables.net/examples/basic_init/themes.html) I imported these at my code: ``` <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> <html> <head> <script src="scripts/jquery-1.4.4.min.js" type="text/javascript"></script> <script src="scripts/jquery.dataTables.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $('#example').dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers", "oLanguage": { "sLengthMenu": "Sayfada _MENU_ kayıt göster", "sZeroRecords": "Kayıt bulunamadı", "sInfo": "_TOTAL_ kayıttan _START_ - _END_ arası gösteriliyor", "sInfoEmpty": "toplam 0 kayıt arasında 0 - 0 arası kayıt gösteriliyor", "sInfoFiltered": "(toplam _MAX_ kayıt arasında filtreleme yapıldı)" } }); $("#submit").click(function(event) { var course = $("#courses :selected").val(); var instructor = $("#instructors :selected").val(); $.ajax({ type:'POST', url: 'assignCourse.action', data: { pageAction:"assignCourse" , courseIdStr: course, instructorIdStr: instructor }, success: function(data) { if (data == null || data == '') { alert('Ders Atama İşlemi Başarıyla Gerçekleştirildi!'); } else { alert(data); } }, error: function(data) { alert('İşlem Gerçekleştirilirken Hata Oluştu!'); } }); }); }); </script> <title>Ders Atama Modülü</title></head> <link href="CSS/style.css" rel="stylesheet" type="text/css" /> <link href="CSS/custom-theme/jquery-ui-1.8.9.custom.css" rel="stylesheet" type="text/css" /> <link href="CSS/demo_page.css" rel="stylesheet" type="text/css" /> <link href="CSS/demo_table_jui.css" rel="stylesheet" type="text/css" /> <body> <h1>Ders Atama Modülü</h1> </body> <table> <tr> <td class="oyun_yazari" height="30" width="20">Ders:</td> <td width="200"> <div> <select id="courses"> <s:iterator value="courseGroups" status="stat"> <option value="<s:property value='courseGroupId'/>"><s:property value='course.name'/> - <s:property value='groupNumber'/>. grup</option> </s:iterator> </select> </div> </td> <td class="oyun_yazari" height="30" width="20">Akademisyen:</td> <td width="274"> <div> <select id="instructors"> <s:iterator value="instructors" status="stat"> <option value="<s:property value='instructorId'/>"><s:property value='instructorName'/> <s:property value='instructorSurname'/></option> </s:iterator> </select> </div> </td> </tr> <tr> <td> <div> <input type="submit" name="submit" id="submit" value="Ata"/> </div> </td> </tr> </table> <table id=example> <thead> <tr> <th>Ders Adı</th><th>Grup</th><th>Akademisyen</th><th>Sil</th> </tr> </thead> <tfoot> <tr> <th>Ders Adı</th><th>Grup </th><th>Akademisyen</th><th>Sil </th> </tr> </tfoot> <tbody> <s:iterator value="assignedInstructors" status="stat"> <tr> <td><s:property value='courseGroup.course.name'/></td> <td><s:property value='courseGroup.groupNumber'/></td> <td><s:property value='instructor.instructorName'/> <s:property value='instructor.instructorSurname'/></td> <td><input type="checkbox"/></td> </tr> </s:iterator> <!-- <tr> <td><div><input type="submit" name="sil" id="sil" value=" Seçili Atanmış Dersleri Sil" /></div></td> </tr> --> </tbody> </table> </html> ``` style.css is mine, others are taken from datatable api and jquery css codes. When I run the program I get a page like these: ![screenshot](https://i.stack.imgur.com/H1mt2.jpg) Ps: My page is in an iframe. Thanks for your help.
jQuery Datatable Resizing Problems
CC BY-SA 2.5
0
2011-01-27T16:29:55.767
2018-06-08T00:59:04.623
2012-09-10T05:12:15.087
344,050
453,596
[ "jquery", "html", "jquery-ui", "struts2", "datatables" ]
4,819,638
1
null
null
0
46
``` <iframe src="http://google.com" height="650" width="350"></iframe> ``` ![enter image description here](https://i.stack.imgur.com/SPKxo.png) How to get rid of the inconsistent border colors?
Resizing iframe causes inconsistent border color
CC BY-SA 2.5
null
2011-01-27T16:21:24.027
2011-01-27T17:26:31.213
null
null
null
[ "iframe" ]
4,819,626
1
6,804,786
null
109
47,253
I've been trying to get my head around the Android orientation sensors for a while. I thought I understood it. Then I realised I didn't. Now I think (hope) I have a better feeling for it again but I am still not 100%. I will try and explain my patchy understanding of it and hopefully people will be able to correct me if I am wrong in parts or fill in any blanks. I imagine I am standing at 0 degrees longitude (prime meridian) and 0 degrees latitude (equator). This location is actually in the sea off the coast of Africa but bear with me. I hold my phone in front of my face so that the bottom of the phone points to my feet; I am facing North (looking toward Greenwich) so therefore the right hand side of the phone points East towards Africa. In this orientation (with reference to the diagram below) I have the X-axis pointing East, the Z-axis is pointing South and Y-axis point to the sky. ![](https://developer.android.com/images/axis_device.png) Now the sensors on the phone allow you to work out the orientation (not location) of the device in this situation. This part has always confused me, probably because I wanted to understand how something worked before I accepted that it did just work. It seems that the phone works out its orientation using a combination of two different techniques. Before I get to that, imagine being back standing on that imaginary piece of land at 0 degrees latitude and longitude standing in the direction mentioned above. Imagine also that you are blindfolded and your shoes are fixed to a playground roundabout. If someone shoves you in the back you will fall forward (toward North) and put both hands out to break your fall. Similarly if someone shoves you left shoulder you will fall over on your right hand. Your inner ear has "gravitational sensors" [(youtube clip)](http://www.youtube.com/watch?v=mmBB2bu1gEQ&feature=related) which allow you to detect if you are falling forward/back, or falling left/right or falling down (or up!!). Therefore humans can detect alignment and rotation around the the same X and Z axes as the phone. Now imagine someone now rotates you 90 degrees on the roundabout so that you are now facing East. You are being rotated around the Y axis. This axis is different because we can't detect it biologically. We know we are angled by a certain amount but we don't know the direction in relation to the planet's magnetic North pole. Instead we need to use a external tool... a magnetic compass. This allows us to ascertain which direction we are facing. The same is true with our phone. Now the phone also has a 3-axes accelerometer. I have idea how they actually work but the way I visualise it is to imagine gravity as constant and uniform 'rain' falling from the sky and to imagine the axes in the figure above as tubes which can detect the amount of rain flowing through. When the phone held upright all the rain will flow through the Y 'tube'. If the phone is gradually rotated so its screen faces the sky the amount of rain flowing through Y will decrease to zero while the volume through Z will steadily increase until the maximum amount of rain is flowing through. Similarly if we now tip the phone onto its side the X tube will eventually collect the max amount of rain. Therefore depending on the orientation of the phone by measuring the amount of rain flowing through the 3 tubes you can calculate the orientation. The phone also has an electronic compass which behaves like a normal compass - its "virtual needle" points to magnetic north. Android merges the information from these two sensors so that whenever a `SensorEvent` of `TYPE_ORIENTATION` is generated the `values[3]` array has values[0]: Azimuth - (the compass bearing east of magnetic north) values[1]: Pitch, rotation around x-axis (is the phone leaning forward or back) values[2]: Roll, rotation around y-axis (is the phone leaning over on its left or right side) So I think (ie I don't know) the reason Android gives the azimuth (compass bearing) rather than the reading of the third accelerometer is that the compass bearing is just more useful. I'm not sure why they deprecated this type of sensor as now it seems you need to register a listener with the system for `SensorEvent`s of type `TYPE_MAGNETIC_FIELD`. The event's `value[]` array needs to bepassed into `SensorManger.getRotationMatrix(..)` method to get a rotation matrix (see below) which is then passed into the `SensorManager.getOrientation(..)` method. Does anyone know why the Android team deprecated `Sensor.TYPE_ORIENTATION`? Is it an efficiency thing? That is what is implied in one of the comments to a similar [question](https://stackoverflow.com/questions/3514808/how-to-get-android-compass-reading/3515412#3515412) but you still need to register a different type of listener in the [development/samples/Compass/src/com/example/android/compass/CompassActivity.java](http://www.netmite.com/android/mydroid/cupcake/development/samples/Compass/src/com/example/android/compass/CompassActivity.java) example. ![](https://developer.android.com/images/axis_globe.png) ![](https://developer.android.com/images/axis_device.png) ![](https://developer.android.com/images/axis_globe_inverted.png) I'd now like to talk about the rotation matrix. (This is where I am most unsure) So above we have the three figures from the Android documentation, we'll call them A, B and C. A = SensorManger.getRotationMatrix(..) method figure and represents the World's coordinate system B = [Coordinate system used by the SensorEvent API.](http://developer.android.com/reference/android/hardware/SensorEvent.html) C= SensorManager.getOrientation(..) method figure So my understanding is that A represents the "world's coordinate system" which I presume refers to the way locations on the planet are given as a (latitude, longitude) couple with an optional (altitude). X is the ["easting"](http://en.wikipedia.org/wiki/Easting_and_northing) co-ordinate, Y is the ["northing"](http://en.wikipedia.org/wiki/Easting_and_northing) co-ordinate. Z points to the sky and represents altitude. The phones co-ordinate system is shown in figure B is fixed. Its Y axis always points out the top. The rotation matrix is being constantly calculated by the phone and allows mapping between the two. So am I right in thinking that the rotation matrix transforms the coordinate system of B to C? So when you call `SensorManager.getOrientation(..)` method you use the `values[]` array with values that correspond to figure C. When the phone is pointed to the sky the rotation matrix is identity matrix (the matrix mathematical equivalent of 1) which means no mapping is necessary as the device is aligned with the world's coordinate system. Ok. I think I better stop now. Like I said before I hope people will tell me where I've messed up or helped people (or confused people even further!)
Android phone orientation overview including compass
CC BY-SA 3.0
0
2011-01-27T17:20:33.807
2014-06-27T04:27:24.167
2017-05-23T11:47:29.557
-1
516,286
[ "android", "orientation", "device-orientation", "bearing", "compass-geolocation" ]
4,819,695
1
4,819,826
null
0
66
you know when we display texts on pages in the way is ment to, no matter if is whit `<p>` or `<h1>` or any other tag the result is always the same: ![enter image description here](https://i.stack.imgur.com/7Dcyd.jpg) () Pixalated areas on the curves of the text. Is any way to render good looking texts on the browser with cross browser capabilities using libraries made on or ? ().
Suggestions to render good looking texts on a browser using opensource libraries
CC BY-SA 2.5
null
2011-01-27T17:26:52.790
2011-01-27T17:39:07.793
null
null
310,648
[ "php", "javascript", "html" ]
4,819,973
1
4,820,010
null
2
1,841
I'm making multiple AJAX calls that returns XML data. When I get the data back, my success function (in JQuery) tries to turn the XML to JSON (using a plugin). I was quickly reminded why I can't assume I would be getting VALID XML back from my AJAX request -- because it turns out a few of the XML responses were invalid -- causing the JSON conversion to fail, script to fail, etc... My questions are: 1. What is the best way to check for valid XML on an AJAX response? Or, should I just attempt the JSON conversion, then do a quick check if the JSON object is valid? 2. In troubleshooting the XML, I found that there are a few strange characters at the VERY beginning of the XML response. Here's an image from my Firebug: ![Bad XML Response](https://i.stack.imgur.com/mDOZI.jpg) Should I try to detect and strip the response of those chars or could there possibly be something wrong with my encoding? Any help is appreciated! Let me know if more info is needed!
Strange characters at beginning of XML AJAX response?
CC BY-SA 2.5
null
2011-01-27T17:54:42.387
2011-01-27T23:32:38.060
2020-06-20T09:12:55.060
-1
240,350
[ "php", "jquery", "xml", "ajax", "json" ]
4,820,295
1
null
null
1
981
In the Windows Forms world you can take a panel and set it's dock property to fill and so on with nested panels, when the user resizes the window the panels and nested panels automatically resize too. I want to achive something similar with Silverlight, here is my current structure. ``` Main ScrollViewer // for body UserControl Grid control Scrollviewer // this is where my problem is Control ``` The problem is I can set a size for the nested scroll viewer that looks good for 1024 resolution, but I also want to account for users that have larger resolution. If I leave it auto the content just stretches below the visible bottom line and defers to the top level ScrollViewer. If I could achieve something analogous to how Windows Forms handles this with docking I think my problem would be solved. I must have a ScrollViewer for the nested panel and I want it to fill all `visible space` left. How Can I achieve this with SL4 or WPF? [Edit] Here is an illustration of what i'm after. ![enter image description here](https://i.stack.imgur.com/OXkfx.png)
Silverlight 4/WPF - Nested ScrollViewer panel that scales with available screen size
CC BY-SA 2.5
null
2011-01-27T18:28:22.050
2011-01-28T00:47:53.727
2011-01-28T00:47:53.727
56,753
56,753
[ "wpf", "silverlight-4.0", "panel", "scaling", "scrollviewer" ]
4,820,350
1
4,821,027
null
3
1,882
I'm looking to replicate with Cocoa/Core Graphics the process which seems to occur on iOS when setting an image for a `UITabBarItem`. When the tab bar item is selected, the image is overlayed with a gradient. For example, ![enter image description here](https://i.stack.imgur.com/Ri0gN.png) becomes... ![enter image description here](https://i.stack.imgur.com/xF7Jw.png) I'm unsure exactly what I should be doing to achieve this effect. It seems like the image is masking the gradient. Any pointers in the right direction (or code!) would be much appreciated.
NSImage Overlay/Mask Gradient like iOS
CC BY-SA 2.5
0
2011-01-27T18:35:00.637
2011-01-27T19:42:26.240
null
null
348,308
[ "cocoa", "core-graphics", "nsimage", "uitabbaritem" ]
4,820,362
1
4,820,607
null
2
619
Normally I'm able to fix my HTML errors by myself since it's not that complicated, but this time, I'm having a hard one. I decided to change my navigation on my website and most of it works well & most browsers displays it correctly. Where my problem is tho, is that I have a 5-6px margin I cannot find where is coming from. The link & image showing my problem will be below. My second problem is that IE7 shows a huge margin, and again, I cant spot where it's coming from. The webpage URL is: [Deaglegame.net](http://deaglegame.net) & below here is the image: ![http://i.stack.imgur.com/2SBP9.png](https://i.stack.imgur.com/2SBP9.png) I'm leaving for work in a couple hours, so if I dont reply it's not because I dont wanna reply, I'll check this thread as soon as possible, but any help is greatly appreciated! Thanks to anyone willing to help!
HTML Cross browser issues on website
CC BY-SA 2.5
null
2011-01-27T18:35:54.007
2011-01-27T19:00:47.717
2011-01-27T18:50:40.373
158,014
592,698
[ "html", "margin" ]
4,820,370
1
4,822,477
null
5
1,665
I need to develop an optical character recognition program in Matlab (or any other language that can do this) to be able to extract the reading on this photograph. The program must be able to upload as many picture files as possible since I have around 40000 pictures that I need to work through. ![](https://i.stack.imgur.com/hMZmW.jpg) The general aim of this task is to record intraday gas readings from the specific gas meter shown in the photograph. The is a webcam currently setup that is programmed to photgraph the readings every minute and so the OCR program would help in then having historic intraday gas reading data. Which is the best software to do this in and are there any online sources that are available for this??
Optical character recognition program for photographs
CC BY-SA 2.5
null
2011-01-27T18:36:18.960
2022-02-26T08:23:10.220
2011-01-27T18:43:23.743
495,296
495,296
[ "matlab", "ocr" ]
4,820,424
1
4,850,007
null
0
883
I have a rails CMS app that manages content for a production web server (not a rails app). They are on two boxes. ![separate](https://i.stack.imgur.com/vIx3M.png) The database in staging needs to copy data (database is very small,<1MB) to the production database. This needs to be done manually, not thru replication. To make it more difficult the production server is only accessible thru SSH, access for other services is not allowed (typical secure environment). I've tried writing some rake/Capistrano tasks to do a mysql dump on the staging server and import it into the production server, although this would lock the production database, making requests fail. The production server cannot be brought down during the syncs. What are my options?
Rails App- Sync "staging" db with "production"
CC BY-SA 2.5
null
2011-01-27T18:42:16.100
2011-01-31T10:51:06.280
null
null
114,696
[ "mysql", "ruby-on-rails", "ruby", "synchronization" ]
4,820,626
1
4,830,399
null
0
1,296
Yes, the title is correct. Is there a way to code review a project that exists in TFS (Microsoft's Team Foundation Server) from a user's computer that is connected to that TFS repository via an SVN Bridge? (related: an SVN Bridge is a tool that allows the use of Subversion tools to connect to an TFS repository) Why? Because we have developers that highly defend (to their death) the use of SVN over TFS. And these senior developers will be doing the code reviews of checkins from the the 3rd party vendor. The problem is that the project currently resides in TFS, and will remain there (per CTO's instructions). We are allowed an SVN Bridge, but yet it is not clear to me if any of these code review tools support such a cross-platform. How would it? Well, I would think that it would know the files in the code review package. Why can't it compare those files to an SVN directory instead of an TFS? What prompted me to think of this environment is this demo of Code Collaborator: [http://smartbear.com/docs/viewlets/CodeCollabDemo/CodeCollabDemo.html](http://smartbear.com/docs/viewlets/CodeCollabDemo/CodeCollabDemo.html) Screenshot: ![enter image description here](https://i.stack.imgur.com/eyN1D.png) Notice that at the begining, it asks for what repository to review? What if the remote team chooses TFS, and the local team chooses SVN? Yes, I'll ping their technical support for that question. But I also wanted to post the question here for anyone that may have a similar setup. Thanks in advance.
TFS Code Review from an SVN Bridge?
CC BY-SA 2.5
null
2011-01-27T19:03:11.260
2018-10-06T14:15:29.840
2018-10-06T14:15:29.840
null
56,693
[ "svn", "tfs", "tfs-code-review", "svnbridge" ]
4,820,886
1
4,821,048
null
3
1,918
i am learning WPF. i saw a very beautiful application called Blu Twitter client developed with WPF. their UI is really glossy. ![enter image description here](https://i.stack.imgur.com/JUr1i.png) can anyone give me some tips that how could i create this type of glossy UI with WPF. what i need to do.......need concept. thanks
Regarding WPF & attractive UI
CC BY-SA 2.5
null
2011-01-27T19:29:05.447
2014-01-06T11:08:18.010
null
null
508,127
[ "wpf", "user-interface" ]
4,820,885
1
4,823,730
null
5
743
I'm displaying a statusItem at launch like this: ``` theItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain]; NSString *theString = [textField stringValue]; (textField.stringValue = theString); [theItem setTitle:theString]; [theItem setHighlightMode:YES]; ``` The text looks very fuzzy. How can I clean up the look of the text? Thanks. Paul Here's a screenshot with the digital menu bar clock on top, and NSStatusItem title on bottom: ![Digital Clock on top, NSStatusItem title on bottom](https://i.stack.imgur.com/nNSqO.png)
Fuzzy text in NSStatusItem
CC BY-SA 3.0
0
2011-01-27T19:29:02.113
2011-09-12T19:35:11.637
2011-09-08T19:38:51.230
196,079
580,846
[ "cocoa", "nsstatusitem" ]
4,821,102
1
5,598,686
null
1
788
My application is using wxPython and runs on Linux and Windows without modification. The problem is display of Fonts. On Linux it looks perfect, but on Windows the "-" sign is totally broken and the text is not quite as nice. Here are some comparison pics: ![Fedora 13](https://i.stack.imgur.com/c0EBN.png) ![Windows](https://i.stack.imgur.com/s1IvG.png) See how the minus sign in the "Add" block is broken on Windows. This is rendered by converting the standard hyphen to a unicode character to get the full sized minus. I'm guessing this character doesn't exist in the default font used in Windows. The other stuff looks poor on Windows too, but is somewhat tolerable. The code I'm using looks like this: What is the simplest platform independent way to get a decent minus sign on Windows too? Is there a freely licensed font I can include with the app that contains this? How do I use it in wxPython? I don't want to install fonts on the system, and I don't want to use the hyphen "-" character because it looks terrible in these diagrams due to it's size.
Font differences using wxPython on Windows/Linux
CC BY-SA 2.5
null
2011-01-27T19:49:55.063
2011-04-08T17:31:56.770
2011-02-18T17:41:47.660
224,848
224,848
[ "fonts", "cross-platform", "wxpython" ]
4,821,572
1
null
null
1
1,161
I'm trying to use jQuery UI's sortable but when dragging from one container to another, the item is appearing BEHIND the container. JSFiddle: [http://jsfiddle.net/7LrLE/8/](http://jsfiddle.net/7LrLE/8/) I've uploaded a screen: ![enter image description here](https://i.stack.imgur.com/Up1xp.png) Here's my code: ``` <ul class="droppable grid-9"> <li>aaaaaaaa</li> <li>bbbbbbbbbbbbbbbb</li> <li>ccccccccccccccc</li> </ul> <ul class="droppable grid-9"> <li>xxxxxxxxxxx</li> <li>yyyyyyyyyyyy</li> <li>zzzzzzzzzzzzzz</li> </ul> ``` And here's my jQuery code: ``` $('.droppable').sortable({ appendTo: 'body' axis: 'y', connectWith: '.droppable', zIndex: 5 }).disableSelection(); ``` Any help is greatly appreciated! ## FIXED I was able to fix the issue using the following jQuery code: ``` $('.droppable').sortable({ axis: 'y', connectWith: '.droppable', over: function() { $(this).css('z-index', '1'); }, start: function() { $(this).css('z-index','2'); } }).disableSelection(); ```
jQuery UI Sortable - IE6 & IE7 z-index issue
CC BY-SA 2.5
null
2011-01-27T20:37:41.030
2011-01-28T13:59:48.157
2011-01-28T13:59:48.157
322,551
322,551
[ "jquery", "internet-explorer", "jquery-ui", "jquery-ui-sortable" ]
4,821,664
1
4,851,365
null
20
5,799
As seen in the screenshot here, 0 live objects, 9 allocated objects. What's the difference between a live and an allocated object ? ![jvisualvm screenshot](https://i.stack.imgur.com/SaZQS.png)
jvisualvm difference between live objects and allocated objects
CC BY-SA 2.5
0
2011-01-27T20:46:28.553
2014-12-03T09:47:07.367
null
null
386,593
[ "java", "jvisualvm" ]
4,821,724
1
12,196,766
null
28
64,994
Is there anyway to remove the outline when you select an area on an image map? See: ![enter image description here](https://i.stack.imgur.com/EL8BB.png) I'm using Chrome on Snow Leopard.
Removing outline on image map area
CC BY-SA 3.0
0
2011-01-27T20:52:37.053
2014-07-27T10:15:54.720
2014-07-27T10:15:54.720
2,979,418
430,048
[ "html" ]
4,822,144
1
4,824,872
null
0
181
I have a ContenView with a LinearLayout containing a few TextViews and then a TabHost. The TabHost has 3 tabs which may contain a ListActivity with many items, and thus require scrolling. Currently the FrameLayout automatically gets a vertical scrollbar, but I want to have a scrollbar on the main view. Ie. when I scroll down to view the rest of the ListActivity in my current tab I want the TextView above the tab to scroll out of sight. Any ideas? Take a look at this screenshot I made to clarify. The left screen is how it currently is. The right one is photoshopped to what I want to achieve. ![enter image description here](https://i.stack.imgur.com/G2sIX.png) --- solved it using a workaround not requiring internal scroll
Tab without internal scroll
CC BY-SA 3.0
0
2011-01-27T21:34:54.507
2016-02-23T19:49:24.137
2016-02-23T19:49:24.137
534,386
534,386
[ "android" ]
4,822,261
1
4,823,095
null
9
6,031
If I need to generate a keyboard layout for customization to the user that looks like his/her keyboard, how can I do it? For instance something like this: ![enter image description here](https://i.stack.imgur.com/0o5ia.png) French, Swedish, English, Canadian, etc will have different layouts, right. Is this a lot of work or just a matter of using some sort of built in .NET regional classes?
Is it possible to create a keyboard layout that is identical to the keyboard used?
CC BY-SA 3.0
0
2011-01-27T21:46:01.193
2023-02-17T10:28:18.460
2012-08-01T07:18:50.417
1,369,235
51,816
[ "c#", ".net", "globalization", "regional" ]
4,822,398
1
4,823,350
null
0
1,448
I am working with on an application that I am Dragging and Dropping Items, and creasting grids dynamically based on the contents of the objects I am dropping(some objects will require me to create a grid with 2 columns, some with 4,etc). This is simple enough to do, but when I try to specify how wide I would like these columns to be, it is not working, and it is showing the grids on top of eachother. I will attach what the columns look like. The first example shows the result of 5 objects being dragged and dropped. You can see that the the width specification has no effects. ![enter image description here](https://i.stack.imgur.com/9mit0.png) The second example is the same thing, but shows that the grids are not following the width specifications. When I go to drop an "Email" object onto the "Zip" object, it overlays the grids. ![enter image description here](https://i.stack.imgur.com/KioUD.png) Here is the code that I am using to create the definitions. As you can see for each Item I iterate over, I am creating a label for. ``` /*Initialize Grid Layout*/ Grid newGrid = new Grid(); newGrid.MinHeight = 40; /*Define Column Definitions*/ List<ColumnDefinition> columns = new List<ColumnDefinition> (fieldItemList.Count); foreach (ColumnDefinition column in columns) { ColumnDefinition labelColumn = new ColumnDefinition(); /*Specify Width Dimensions*/ labelColumn.Width = new GridLength(150); labelColumn.MaxWidth = 200.0; newGrid.ColumnDefinitions.Add(labelColumn); newGrid.ColumnDefinitions.Add(column); } /*Define Row Definitions*/ RowDefinition row = new RowDefinition(); newGrid.RowDefinitions.Add(row); ``` How do I get it to respect the width boundaries I am assigning to the column definitions?
Width and MaxWidth properties not working for WPF ColumnDefinitions
CC BY-SA 2.5
null
2011-01-27T21:59:11.667
2011-01-28T03:27:10.120
null
null
180,253
[ "c#", "wpf", "visual-studio" ]
4,822,460
1
4,822,708
null
0
41
I have a project in which I'm simulating db of users in some game. Each user has Equipment, which stores items. Now I'd like to add table storing amount of each item in each users equipment but I'm not quite sure how should look the relation between Equipment|Equipment_items|Items_amount tables. Here's the scheme from Visio: ![enter image description here](https://i.stack.imgur.com/W9PIm.png)
Simple relation with amount of items
CC BY-SA 2.5
null
2011-01-27T22:06:46.010
2011-01-27T22:31:15.460
null
null
299,499
[ "sql", "oracle", "entity-relationship", "database-schema" ]
4,822,551
1
4,852,222
null
3
3,310
I'm making a [Minecraft](http://www.minecraft.net/)-ish terrain engine to learn some OpenGL and 3D and everything works fine except for the FPS which I'm not happy with. ![About 66 fps with 50k vertices/frame](https://i.stack.imgur.com/CM7jN.png) : I'm currently only drawing the visible faces and using frustum culling, the cubes are in 16 by 16 by 32 cube chunks (for now). I use 6 display lists per chunk, one for each side (left, right, front, back, up, down) so cubes aren't drawn one by one, but a whole chunk side at the time. With this method I get about 20-100fps which isn't great. Profiling says I send about 100k vertices to the graphics card and as soon as I look at the sky and the vertices fall under 10k I'm up to 200+fps, so I guess that's my bottleneck. : Since less is more I went ahead and found this: [http://ogre3d.org/forums/viewtopic.php?f=2&t=60381&p=405688#p404631](http://ogre3d.org/forums/viewtopic.php?f=2&t=60381&p=405688#p404631) From what I understand uses a 3D mesh of huge planes and somehow draws textures from a 2D texture atlas to certain locations of these huge planes. He says he uses a 256x256x256 3D texture and the green and blue channels to map to the 2D texture atlas. His method totals a constant number of vertices for the planes and sometimes useless ones if my map would've been applied, but it's still less than what I have now. : I didn't understand anything he said :(, I want to try his method, but I don't understand what he did exactly, mostly I think it's my lack of experience with 3D textures (I'm imagining a block of pixels). How did he map a texture from a texture atlas to only a part of a plane and this by using some 3D texture map... Can anyone explain what did or point me to some helpful place, even Google isn't of any help right now.
OpenGL 3D textures and mapping on part of a quad
CC BY-SA 2.5
0
2011-01-27T22:15:01.983
2011-01-31T14:47:47.127
null
null
176,269
[ "opengl", "texture-mapping" ]
4,822,695
1
8,110,754
null
4
2,015
I have a fluid width theme and I am using jQuery Masonry and Infinite Scroll. The Problem is that if you scroll at a certain speed (not too fast and not too slow) the page it can cause a break in the grid. I have only seen this with two columns and in Firefox: ![screen layout](https://i.stack.imgur.com/bA4EL.jpg) Anyone know why this is happening? I know it could be a number of things but if anyone has had experience with this and knows what is going on it would help greatly. UPDATE: The break happens right after the last post on the page. The ones that come after are being generated by infinite scroll's callback.
Masonry and Infinite Scroll breaking layout when scrolling at certain speed
CC BY-SA 3.0
null
2011-01-27T22:30:01.187
2012-10-21T07:58:02.347
2011-11-13T10:01:05.320
447,356
340,688
[ "javascript", "jquery", "jquery-masonry", "infinite-scroll" ]
4,822,912
1
4,822,990
null
11
61,095
I'm new to CSS. Ive created a Drupal site and playing with the theme. I have some breadcrumb stuff that I would like to theme. If I go into Firebug and turn off the CSS properties ``` background border-color border-style ``` in the below code ``` .breadcrumbs .inner { background: none repeat scroll 0 0 #EFEFEF; border-color: #929292 #E2E2E2 #FFFFFF; border-style: solid; border-width: 1px; color: #8E8E8E; } ``` I get the text looking exactly how I want it. If I now go into my style.css which is inheriting the code and post ``` .breadcrumbs .inner { border-width: 1px; color: #8E8E8E; } ``` The formatting I don't want is retained. If I specify `.breadcrumbs .inner` in the style.css does that not set it up again and override what was specified higher up the cascade? If that is not the case how do I stop the inheritance without changing the other style sheet? Thanks, Andrew Additional Info Here is what I have at the moment ![enter image description here](https://i.stack.imgur.com/IUk78.png) This is what I want to have ![enter image description here](https://i.stack.imgur.com/ORD5k.png)
CSS inheritance and overriding it
CC BY-SA 3.0
null
2011-01-27T22:53:54.950
2015-03-21T10:04:13.833
2015-03-21T10:04:13.833
2,009,178
591,547
[ "css" ]
4,823,096
1
4,823,134
null
0
856
I want to display a calender view summary report, where on page load I can display all the dates in the current month and a particular count for date. On mouse hover over the date another grid summary should pop up showing more details in breakage. (Look for the attached image for more details.) Is there any asp control to do the same? I Looked at some Calendar controls from asp, but they don't tend to meet my need. (Or else I am planning to do a customized grid view of rows and columns and link them to dates of the month and display other details.)![enter image description here](https://i.stack.imgur.com/zZNKE.jpg)
Creating a Calender View Summary Report
CC BY-SA 2.5
null
2011-01-27T23:14:48.990
2011-01-27T23:20:58.430
null
null
284,606
[ "asp.net", "calendar", "fullcalendar", "report", "summary" ]
4,823,217
1
null
null
0
2,283
I need a layout for a (list) row which contains two `ImageView` and one `TextView` (in the middle). Both images should be to the edges of the screen and the `TextView` is expected to fill the space between. My problem is, that the text can be set dynamically. Right now I'm working with a `TableLayout` and the attribute `android:stretchColumns`, but it could be that the text is longer then the available size, so both `ImageView` are moved out of the screen. Can someone provide a layout for me, with is resistant for long textes ? It should look like this: ![Visualisation of desired layout](https://i.stack.imgur.com/OyfMR.png)
Row layout with text within two icons
CC BY-SA 2.5
null
2011-01-27T23:34:26.593
2011-07-26T07:51:08.777
2011-01-28T11:32:56.497
566,904
566,904
[ "android", "layout" ]
4,823,338
1
4,823,425
null
0
267
I am trying to order the data in the table by using the following query : select * from customers order by CUST desc All the entries are being ordered properly except : CUST.10 How do i make it order properly so that CUST.10 shows at the top followed by CUST.9, CUST.8 and so on. ![weird mysql ordering](https://i.stack.imgur.com/e1937.png)
mySQL order by clause weird problem
CC BY-SA 2.5
null
2011-01-27T23:54:58.333
2011-01-28T00:36:43.877
null
null
278,851
[ "sql", "mysql", "sql-order-by" ]
4,823,560
1
4,823,706
null
0
111
I have to join 3 tables somewhere on my project. Here is example tables and columns: ``` Table-1 : posts Columns1: id,owner,title,post,keywords Table-2 : sites Columns2: id,name,url Table-3 : views Columns3: id,post,view ``` When I join all these tables it happens such a little huge query: ``` SELECT title,post,keywords,name,url,view FROM posts LEFT JOIN sites ON sites.id=posts.owner LEFT JOIN views ON views.post = post.id WHERE posts.date BETWEEN '2010-10-10 00:00:00' AND '2010-11-11 00:00:00' ORDER BY views.view DESC LIMIT 0,10 ``` Is it the only way or could I do something else to get better performance? This is my current query's EXPLAIN. Above one is just an example. ![MysqlFront EXPLAIN Result](https://i.stack.imgur.com/1YupH.jpg)
What is the better way than joining 3 tables?
CC BY-SA 2.5
null
2011-01-28T00:33:21.107
2011-01-28T09:27:48.410
2011-01-28T09:27:48.410
288,206
288,206
[ "sql", "mysql", "query-optimization" ]
4,823,590
1
4,823,958
null
1
2,661
Using VS 2010 and the latest version of ReSharper... When I create a BaseController class I get the red squiggly stating the "Type is Expected". The project will still compile but I have not tried to run it yet. See attached image. Any ideas what causes this? ![enter image description here](https://i.stack.imgur.com/zEak7.gif)
asp.net MVC Base Controller error - Type Expected
CC BY-SA 2.5
0
2011-01-28T00:37:14.490
2011-01-28T01:34:57.120
null
null
202,820
[ "asp.net-mvc-3" ]
4,823,625
1
null
null
0
262
My deadline to have my site up is soon, and I can't figure out why the server is only letting it's local users access the site's directory! IE is showing me this box before I can even connect to the site: ![enter image description here](https://i.stack.imgur.com/ntXoL.png) I have tried everything I can think of, enabling/disabling Anonymous access, integrated windows authentication, messing with < authorization >/< identity > tags in web.config and I can't figure it out! Has anyone ran into this problem before and know how to fix it?? BTW, this is an intranet/internal site only.Sorry if not enough info, I need to have this up in the next 20 min ><; I'll provide any additional info needed..
Server Local Users only allowed access to my site, please help
CC BY-SA 2.5
null
2011-01-28T00:42:17.413
2011-01-28T00:47:50.497
null
null
550,309
[ "asp.net", "iis" ]
4,823,635
1
4,824,100
null
9
396
I'm working on a "plan of action" at my job for migrating our source control from SourceSafe 6.0 (ugh) to a DVCS like git or Mercurial (preferably git ATM). Right now I am working on the future repository design, i.e. branch layout and how to configure the 'central'/blessed repo(s). Now, insofar I have only really used git as a means to push hobby open source code to [GitHub](https://github.com) and more recently for keeping my own private repo at work so that I have more fine-grained control over my code revisions than SourceSafe allows. Unfortunately I have yet to experience a wide gamut of branching/merging scenarios or other semi-complex git usage in my repos besides using simple feature branches. In other words, I don't have a lot of overall experience with DVCS', so I don't think I can predict the typical workflow we will use here and therefore am unable to create a matching repository design on my own. So instead, I have spent a lot of time reading other people's git workflows and trying to best apply those strategies to how we release code at my job. I figure it's a place to start anyway, and we can change it as we go along. Now, after looking at many git workflows, I am really liking a particular one [outlined by Vincent Driessen](http://nvie.com/posts/a-successful-git-branching-model/), which seems to have a very clean branch layout that is a near-fit for how we do deployments at work (or should, anyway): ## Separate Dev/Stable Using Branches --- ![Separate Dev/Stable Using Branches](https://i.stack.imgur.com/PJQaE.png) However, I admit to being a little confused after seeing a little different example on [Joel Spolsky's HgInit site](http://hginit.com/05.html), which seems to focus more on separate repositories rather than branches for separating dev and stable code: ## Separate Dev/Stable Using Repos --- ![Separate Dev/Stable Using Repos](https://i.stack.imgur.com/ma1TX.png) ## Questions --- Is this repository-focused separation layer simply a Mercurial thing that isn't used much with git? If not, then what are the advantages/disadvantages to using this method over the use of branches for separating dev/stable code? Or am I simply completely misunderstanding what is going on here? :-) Any input would be appreciated; I apologize in advance if this question is a waste of time due to my being steeped in ignorance.
DVCS Repo Design - separate dev from stable using branches or separate repos?
CC BY-SA 2.5
0
2011-01-28T00:44:00.330
2012-08-27T14:02:39.257
2012-08-27T14:02:39.257
11,343
215,168
[ "git", "mercurial", "repository", "workflow", "dvcs" ]
4,823,859
1
null
null
2
1,893
I'm currently using Google Chrome as my main browser. I wondered how the developers put the custom titlebar, because I wanted to incorporate into one of my own applications. If you guys don't know what I'm talking about, here's a picture: ![Screenshot](https://i.stack.imgur.com/icCiZ.png) I found an article about the interface, which is here:[http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/33870516-9868-48d3-ab53-6269d9979598](http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/33870516-9868-48d3-ab53-6269d9979598) However, I don't know how to do this. I'm currently using VC++ Express. Can anyone give me step by step instructions and how to get an interface like that? Except I don't want tabs on top. I'm writing this in Win32.
How do I handle WM_NCCALCSIZE and make chrome-like interface?
CC BY-SA 3.0
null
2011-01-28T01:19:14.380
2018-10-16T14:55:22.420
2014-07-27T21:22:46.820
2,732,991
593,134
[ "c++", "winapi", "visual-c++", "user-interface", "google-chrome" ]
4,823,904
1
5,024,858
null
15
23,673
This maybe very simple but I cant seem to sort it out on my own. I have created a simple db and entity modal that looks like this ![enter image description here](https://i.stack.imgur.com/3WQQO.png) I am trying to create an Create form that allows me to add a new Order. I have a total of 3 tables so what I am trying to do is have the form allowing the person to enter Order date and also has a dropdown list that allows me to select a product from the product table I want to be able to create a Add or Edit view that allow me to insert the OrderDate into the OrderTable and also insert the OrderID and selected ProductID into OrderProduct. What steps do I need to do here. I have created an OrderController and ticked the "Add Actions" and than added a Create View which looks like this ``` @model Test.OrderProduct @{ ViewBag.Title = "Create2"; } <h2>Create2</h2> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> @using (Html.BeginForm()) { @Html.ValidationSummary(true) <fieldset> <legend>OrderProduct</legend> <div class="editor-label"> @Html.LabelFor(model => model.OrderID) </div> <div class="editor-field"> @Html.EditorFor(model => model.OrderID) @Html.ValidationMessageFor(model => model.OrderID) </div> <div class="editor-label"> @Html.LabelFor(model => model.ProductID) </div> <div class="editor-field"> @Html.EditorFor(model => model.ProductID) @Html.ValidationMessageFor(model => model.ProductID) </div> <p> <input type="submit" value="Create" /> </p> </fieldset> } <div> @Html.ActionLink("Back to List", "Index") </div> ``` This creates the view that contains a textbox for both OrderID and ProductID however no date. My controller CreatePost hasnt been changed ``` [HttpPost] public ActionResult Create(FormCollection collection) { try { var data = collection; // TODO: Add insert logic here // db.Orders.AddObject(collection); return RedirectToAction("Index"); } catch { return View(); } } ``` My questions are, 1.How do I swap out ProductID textbox to be a dropdown which is populated from Product 2.How do I get the data from FormCollection collection? I thought of just a foreach however I dont know how to get the strongly typed name Any help for a newbie would be very helpful. Thank you!
dropdown in mvc3 edit form
CC BY-SA 2.5
0
2011-01-28T01:25:17.923
2014-04-03T15:44:19.397
2014-04-03T15:44:19.397
1,685,801
293,545
[ "c#", "asp.net-mvc-3", "razor", "html-helper" ]
4,824,235
1
4,824,324
null
0
2,646
I don't know the problem of my code. Please help. Password.java ``` package com.android.steg; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class Password extends Activity implements OnClickListener { Button submitButton; EditText passwordEditText; public static final String PREFS_PRIVATE = "PREFS_PRIVATE"; public static final String KEY_PRIVATE = "KEY_PRIVATE"; public static final String PREFS_READ = "PREFS_READ"; public static final String KEY_READ = "KEY_READ"; public static final String PREFS_WRITE = "PREFS_WRITE"; public static final String KEY_WRITE = "KEY_WRITE"; public static final String PREFS_READ_WRITE = "PREFS_READ_WRITE"; public static final String KEY_READ_WRITE = "KEY_READ_WRITE"; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pass); Button submitButton = (Button) findViewById(R.id.submitButton); submitButton.setOnClickListener(this); } public void onClick(View v) { EditText passwordEditText = (EditText) findViewById(R.id.passwordEditText); SharedPreferences prefs = this.getApplicationContext().getSharedPreferences("prefs_file",MODE_PRIVATE); String password = prefs.getString("password",""); if("".equals(password)) { Editor edit = prefs.edit(); edit.putString("password",passwordEditText.getText().toString()); edit.commit(); StartMain(); } else { if(passwordEditText.getText().toString().equals(password)) { StartMain(); } } } public void StartMain() { Intent intent = new Intent(this, MainActivity.class); startActivity(intent); } } ``` AndroidManifest.xml ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.steg" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false" android:testOnly="false" android:killAfterRestore="true"> <activity android:name=".Password" android:label="@string/app_name" android:clearTaskOnLaunch="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:exported="true" android:name=".EncodeActivity" android:label="@string/app_name"> </activity> <activity android:exported="true" android:name=".DecodeActivity" android:label="@string/app_name"> </activity> </application> <uses-sdk android:targetSdkVersion="7" android:minSdkVersion="5"/> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> <uses-permission android:name="android.permission.WRITE_OWNER_DATA"></uses-permission> <uses-permission android:name="android.permission.READ_OWNER_DATA"></uses-permission> <uses-permission android:name="android.permission.CLEAR_APP_CACHE"></uses-permission> <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA"></uses-permission> </manifest> ``` Pass.xml ![enter image description here](https://i.stack.imgur.com/8SmwE.png) When the Submit button is pressed it should open the MainActivity.java My problem is every time I pressed the Submit button the application forces to close. It should switch to another activity(MainActivity).
Help with login activity using the sharedpreference
CC BY-SA 2.5
null
2011-01-28T02:25:03.630
2011-01-28T02:40:53.003
2011-01-28T02:34:52.487
516,160
516,160
[ "android", "eclipse", "authentication", "passwords", "sharedpreferences" ]
4,824,816
1
null
null
1
168
I have the following problem. In my application user creates a game character using SPECIAL system (Strength, Perception etc with values from 1 to 10). On saving or after (by calling procedure) i need to count statistics of character on the base of SPECIAL parameters values. How can I do this ? This is the relations scheme: ![enter image description here](https://i.stack.imgur.com/PqVDX.png) and here's SQL code : ``` create table Player ( id_player numeric, player_name varchar2(50) not null, age decimal not null, strength decimal not null, perception decimal not null, endurance decimal not null, charisma decimal not null, inteligence decimal not null, agility decimal not null, luck decimal not null, caps decimal not null, statistics numeric, CONSTRAINT chk_s check (strength <= 10), CONSTRAINT chk_p check (perception <= 10), CONSTRAINT chk_e check (endurance <= 10), CONSTRAINT chk_c check (charisma <= 10), CONSTRAINT chk_i check (inteligence <= 10), CONSTRAINT chk_a check (agility <= 10), CONSTRAINT chk_l check (luck <= 10), CONSTRAINT unique_name UNIQUE (player_name), CONSTRAINT PLAYER_PK primary key (id_player) ); create table Player_derived_statistics( id_statistics numeric, carry_weight decimal, hit_points decimal, radiation_resistance decimal, CONSTRAINT DERIVED_STATISTICS_PK primary key (id_statistics) ); alter table Player add constraint PLAYER_DERIVED_STATISTICS_FK1 foreign key (statistics) references Player_derived_statistics (id_statistics); ``` and query returning all parameters: ``` SELECT p.strength, p.perception, p.endurance, p.charisma, p.inteligence, p.agility, p.luck from player p inner join player_derived_statistics s on s.id_statistics = p.statistics; ``` So in the end I'd like to be able to count carry_weight, hit_points and radiation_resistance for each Player. Let's say that all formulas are `(player_parameter * 10) + 150`. What would be better to use : trigger or procedure ? --- EDIT I'm trying to use the code from answer, but I'm getting error `Encountered the symbol "INNER" when expecting one of the following: ( ...`. ``` CREATE OR REPLACE PACKAGE pkg_player_stats AS FUNCTION get_derived_stats( p_id_player IN player.id_player%TYPE ) RETURN derived_stats_rec IS l_stats_rec derived_stats_rec; BEGIN SELECT (p.strength*10)+150, (p.endurance*20)+150, ((p.endurance-1)*2)/100 INTO l_stats_rec.carry_weight, l_stats_rec.hit_points, l_stats_rec.radiation_resistance FROM ( SELECT p.strength, p.endurance from player p inner join player_derived_statistics s on s.id_statistics = p.statistics); RETURN l_stats_rec; END get_derived_stats; END; ```
Evaluate parameters based on entity's values using trigger/procedure
CC BY-SA 2.5
null
2011-01-28T04:24:31.713
2011-05-03T22:14:57.047
2011-01-28T08:18:54.717
299,499
299,499
[ "sql", "oracle", "triggers", "procedure" ]
4,824,924
1
4,824,987
null
5
4,532
I'm trying to move some logics of my web shop application to database engine, so I figured that counting price of cart would be a good start. So I have a relation shown below with Cart_product table having foreign keys with Buyer and Product. The total price of cart for each user would be the price of each product in Cart_product multiplied by it's amount. How and with what can I achieve this ? Trigger, procedure, cursor ? Any help appreciated. ![enter image description here](https://i.stack.imgur.com/k1uW9.png)
How to sum price of products in cart per user
CC BY-SA 2.5
0
2011-01-28T04:46:26.173
2011-05-14T17:00:06.147
2011-05-14T17:00:06.147
135,152
326,276
[ "mysql", "sql", "aggregate-functions" ]
4,824,973
1
4,825,245
null
8
23,155
I've tried nearly everything, but I just can't seem to move the cell.textLabel property down a little bit. I've attached a screenshot below and I've tried nearly everything I could find. I've tried changing the .frame property directly, attempted at modifying if via using the "- (void)tableView:(UITableView *)tableView willDisplayCell" method". I've also tried allocating a custom label. I could move the custom label, but it wouldn't go into separate lines like the original textLabel. I just need to move the pictured multi line label a bit down. Any help is appreciated! ![enter image description here](https://i.stack.imgur.com/SxYop.png)
How can I change a cell's textLabel frame?
CC BY-SA 2.5
0
2011-01-28T04:55:00.830
2015-12-16T10:06:48.090
null
null
345,282
[ "iphone", "ios", "uilabel" ]
4,825,157
1
null
null
0
81
In one of my pages I want open tabs dynamically on clicking of likes like Rediffmail.com For example: ![enter image description here](https://i.stack.imgur.com/ZLIA6.png) How can I do this?
How to open tabs dynamically in my application
CC BY-SA 2.5
null
2011-01-28T05:29:58.090
2011-01-28T07:58:31.430
2011-01-28T05:32:42.133
23,897
532,445
[ "php", "javascript", "jquery-ui", "jquery" ]
4,825,172
1
4,825,591
null
0
438
I came upon many similar questions like this but I could not find simple answer. My goal is to create my web page thumbnail onto my server for a particular User (depending on `SESSION`). Website is dynamic means for every different user content changes like that contents of users on facebook. What I need to do here is generate a screenshot when user experiences a problem with the application and click the capture button ![enter image description here](https://i.stack.imgur.com/hbTL6.png) I got many options like - - but not getting which I should use also suggest other if better. I have and using and have shell access to it. as they are unable to get snapshot in my case (as I said `SESSION` variable is maintained for every user). Please help me with the tutorial.
website screenshot on my server depending on USER
CC BY-SA 4.0
null
2011-01-28T05:32:32.347
2019-08-28T14:24:29.443
2019-08-28T14:24:29.443
3,995,261
440,694
[ "php", "screenshot", "wkhtmltopdf" ]