Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
5,192,884
1
5,206,733
null
6
2,579
I'm trying to implement a traffic sign recognizer with OpenCV and SURF method. My problem is that i get random results (sometimes really accurate, sometimes obviously wrong) and i cant undertsand why. Here is how i implemented the comparison : - - The contour detection works perfectly well : using a gaussain blur and canny edge i manage to find a contour similar to this one : ![enter image description here](https://i.stack.imgur.com/TliLd.jpg) Then i extract the image corresponding to this contour and i compare this image to traffic signs template image such as these : ![enter image description here](https://i.stack.imgur.com/CKeRw.jpg) ![enter image description here](https://i.stack.imgur.com/NxGWz.jpg) The cvExtractSURF returns 189 descriptors for the contour image. Then i use the naiveNearestNeighbor method to find out similarities between my contour image and each template image. Here are my results : for the first template (which is the one i'm expecting to find) for the second template (which is obviously very different in every way to the contour image) I really dont understand these results… Here is the list of the steps i perform : - - - - - - - - - - To evaluate the similarity between the 2 images i use the ratio : number of goog points / total number of descriptors P.S: For information i followed this tutorial : [http://www.emgu.com/wiki/index.php/Traffic_Sign_Detection_in_CSharp](http://www.emgu.com/wiki/index.php/Traffic_Sign_Detection_in_CSharp) And used the find_obj sample of OpenCV to adapt it in C.
Weird result with SURF comparison
CC BY-SA 3.0
0
2011-03-04T11:04:03.540
2012-08-16T13:46:57.163
2011-07-10T04:15:58.973
50,776
315,374
[ "opencv", "surf" ]
5,193,348
1
5,193,408
null
0
436
Got this error when parsing my html page using XPATH.. i am also using HTMLcleaner ![enter image description here](https://i.stack.imgur.com/avaqs.jpg) If it is not clear i can even post my java code and html code
Xpath error related to "nbsp"
CC BY-SA 2.5
null
2011-03-04T11:51:58.040
2011-03-04T14:32:23.837
2011-03-04T14:32:23.837
null
410,693
[ "java", "xml", "parsing" ]
5,193,513
1
5,218,352
null
2
2,694
![Toolbar PrintScreen](https://i.stack.imgur.com/VGmTn.png) Hi everybody, I have some issue with one of my project. I'm currently developing a toolbar for Google Chrome. The concept is that my extension insert by using a content script an iframe in every page i visit. Materialized in Red on my Printscreen. After that i've created another iframe who appear when i click on the "Menu" Button. This iframe appear like a dropMenu. Materialized in orange in the printscreen. Well now let me explain my problem : When i click on the "dropMenuButton" i execute this code : ``` $( "#dM1").click( function() { dropMenu('dropMenu1', $(this).position().left); }); ``` To be clear the function "dropMenu" will call my background page (by messaging exchange) to show or hide the dropMenu, in function if it's allready activated or not. Here is the executed code by the "dropMenu function" ``` if(document.getElementById("dropMenu")) { $("#dropMenu").slideUp(800, function() { $(this).remove(); }); } else { var body = $('body'), MenuURL = chrome.extension.getURL(dropMenuPage + ".html"), iframe = $('<iframe id="dropMenu" scrolling="no" src="'+MenuURL+'">'); body.append(iframe); $("#dropMenu").hide().slideDown(800); // Shift the menu (Left) $("#dropMenu").css({left: marginLeft+'px'}); } ``` So the event on dropMenuButton work perfectly but i want to provide some ameliorations like a .ClickOut event. What i want is that when somebody click outside the dropMenu (in orange) the menu will be hide. I've tried a lot of things but nothing work... Hope somebody will provide me some help ! Thanks in advance. Edit (Injection) : I've tried to inject the javascript like this : ``` var injectJs = $('<script type=text/javascript>' + '$(document).click(function() {' + 'dropMenu("dropMenu1", 0);' + '});'); body.append(injectJs); injectJs = $('$("#dropMenu").click( function(e) {' + 'e.stopPropagation();' + '});' + '</script>'); body.append(injectJs); ``` But it didn't seems to inject on the page. It should have a problem somewhere...
Jquery .ClickOut Event
CC BY-SA 2.5
null
2011-03-04T12:10:11.000
2011-03-07T10:13:10.003
2011-03-04T13:05:38.677
632,950
632,950
[ "javascript", "jquery", "iframe", "google-chrome-extension" ]
5,193,545
1
null
null
0
393
I have a page which contains a user control. The structure of the page is as shown below: ![enter image description here](https://i.stack.imgur.com/XTsX0.jpg) Incase your not able to see the above image, please check it at [http://i54.tinypic.com/2r4id5f.jpg](http://i54.tinypic.com/2r4id5f.jpg) Now, apart from the contents of the UserControl, I'd like to cache the entire page. I tried using the OutputCache attribute in the .aspx page, however it caches the contents of the UserControl as well. Kindly let me know how will I be able to cache the contents of the page except that of the user control. Thanks in advance.
Output caching a page except a user control in it
CC BY-SA 2.5
null
2011-03-04T12:13:50.767
2011-03-04T12:30:19.080
2011-03-04T12:22:38.197
615,847
615,847
[ "asp.net", "caching" ]
5,193,591
1
5,194,628
null
1
182
I am trying to design a database for my web app. The idea is that customers can come on and sell cars that are already listed in the database. Then there will be a list of offers made by other users on the cars. Just looking for some advice really, not sure if my db design would work correctly? also, for sale history, would i be better adding anouther table? or making a query to find sales with an offer with status (sold)? Thanks ![](https://i.stack.imgur.com/EHZCG.jpg)
MySQL database design
CC BY-SA 2.5
null
2011-03-04T12:18:35.870
2011-03-04T13:55:54.657
2011-03-04T12:26:44.567
893
641,503
[ "mysql" ]
5,193,959
1
null
null
3
1,293
I'm afraid that I'm experiencing a bug in Winforms/GDI+. I'm building a graphics path composed by a line and then a curve. At some zoom levels (applying a transform matrix to the graphics object) the path is wrongly drawn, see the picture: ![enter image description here](https://i.stack.imgur.com/ciedz.png) Doing some testing I noticed that if I apply `Flatten()` to the graphics path, the problem dissapears. It seems that the curves are converted to connected segments, and the problem dissapears (this is the code): ``` result.AddLine(sourcex, sourcey, sourcex, sourcey + sourceOffset); result.AddArc(ellipseContainer, startAngle, sweepAngle); result.Flatten(); // this line solves the issue!! ``` I have debugged the application and the number of points in the graphics path is 9 without apply `Flatten()`, and 53 applying `Flatten()`. My question is. What do you think about drawing performance applying Flatten() to graphicsPaths? Do you think that could be affected by this change? Thanks in advance.
How does GraphicsPath.Flatten() affects to the drawing performance?
CC BY-SA 2.5
null
2011-03-04T12:53:22.903
2011-06-24T14:33:32.930
2011-06-24T14:33:32.930
9,453
402,081
[ "c#", "winforms", "gdi+", "system.drawing" ]
5,194,020
1
null
null
0
260
I would like to accomplish two things with this: - Select (any) cell from a grid, and give the 'bands' of neighboring cells an ever increasing value (in this example 1 -5)- From the selected cell, select the next cell in a spiral fashion as show in blue, also accounting for if the 'route' leave the grid. How would I go about this? ![enter image description here](https://i.stack.imgur.com/u01tm.jpg)
selecting a cell in a grid, spiral outwards through neighbour cells?
CC BY-SA 2.5
null
2011-03-04T13:00:53.340
2011-03-04T13:04:51.297
null
null
219,609
[ "actionscript-3", "function", "math", "grid", "formula" ]
5,194,069
1
5,244,391
null
1
456
How to create custom "rename" dialog for my type of resource in Eclipse (basic refactoring)? I'm using eclipse to open certain types of files (not java) in custom GEF editor. Now I want to do some extra job if file is renamed (update referenced to it if user wants etc.). I want to use custom "rename" dialog and add several "checkboxes" there (like [x] update reference1, [x] update reference2, [x] do other extra job) I.e. I need something like that, but for my own type of resources: ![exmple](https://i.stack.imgur.com/Zds09.png) Thanks
How to create custom "rename" dialog for my type of resource in Eclipse (basic refactoring)?
CC BY-SA 2.5
null
2011-03-04T13:05:10.170
2011-03-09T10:27:02.713
2011-03-04T13:27:16.740
93,647
93,647
[ "eclipse" ]
5,194,286
1
5,194,737
null
2
7,630
I'd like to apply some conditional formatting where each cell of a row is compared to the cell in the previous row. If it differs then the row is highlighted. ![Example of desired output](https://i.stack.imgur.com/RMbPl.jpg) I'm using Excel 2007. Is this even possible? If so could someone provide me with the steps to apply this to an entire table of data?
Highlight cells in a row where the value of a particular cell is different to that of the previous row
CC BY-SA 2.5
0
2011-03-04T13:25:06.577
2017-01-06T09:10:57.213
null
null
195,198
[ "excel", "excel-2007", "conditional-formatting" ]
5,194,336
1
5,199,192
null
5
454
I have created a Visual Studio Add-In that adds a form to an existing Project in the opened solution. This is how I create the form: ``` string templatePath = sol.GetProjectItemTemplate("Form.zip", "csproj"); //sol is an EnvDTE80.Solution2 proj.ProjectItems.AddFromTemplate(templatePath, formName); //proj is an EnvDTE.Project ``` After that I can successfully get the reference to the ProjectItem of the added form, then I can get a reference to the System.Windows.Forms.Form, and through this reference I can add a button to the form like this: ``` Button btn = new Button(); btn.Text = "my funky button"; btn.Name = "newButton"; btn.Size = new Size(150, 23); btn.Location = new Point(30, 30); frmNewForm.Controls.Add(btn); //frmNewForm is a System.Windows.Forms.Form ``` And then the button is successfully added to the form: ![enter image description here](https://i.stack.imgur.com/37mQl.png) However, when I try to save this form, it just won’t save. I click Visual Studio’s [save] button, it just doesn’t turn gray. Even if I click [Save All], the form won’t be saved. Then I close Visual Studio, reopen it, and open the project to which I have added the new form with my Add-In, and the new button simply isn’t there. Just an empty form. I’ve even tried saving the project and the solution programmatically through the following code: ``` itemForm.Save(itemForm.Name); //itemFrom is an EnvDTE.ProjectItem proj.Save(proj.FullName); //proj is an EnvDTE.Project ``` I’ve thought that this would be because the instance of the Visual Studio that I was using to test my Add-In is a debug one, opened right after I run my Add-In. But I’ve tried using the installed Add-In (which remained automatically after running it), and the problem persisted. --- I’ve just noticed two things: the button only appears on the design of the form, and nowhere else. And it doesn’t even let me select it to see it’s attributes. It’s name doesn’t appear in Intellisense, in the object list, or even on the design document of the form. As a test, I’ve added a button manually, and this one I can select, and interact with it: ![enter image description here](https://i.stack.imgur.com/bw4bO.png) What I could get from that is that I am not adding the button properly. Then the new question regarding the button would be: How can I add a new button to a form created through EnvDTE in a way that I can interact with it in design time ? While trying to see the differences from my funky button and my Manually added button, I’ve attempted something I hadn’t before with a programmatically created form: instantiate and run it. And here's how I've done it: ``` MyFunkyForm frm = new MyFunkyForm (); frm.Show(); ``` It flashes on the screen (apparently with none of my two buttons), and the execution ends. Even if I try to do something on it’s Form_load, it’s executed, then the form flashes, and the execution is ended (the form is closed and debugging is over), as if I had called the Close() method. Then the additional question would be: Did I skip a step while adding the form, or am I not creating it properly at all ?
Form won't save after creating it with EnvDTE
CC BY-SA 2.5
0
2011-03-04T13:29:54.837
2011-03-04T20:59:02.683
2011-03-04T20:46:56.770
208,670
208,670
[ "c#", "visual-studio-2010", "envdte" ]
5,194,671
1
5,194,920
null
0
270
I have a form with 3 fields. Country, state and users ![none](https://i.stack.imgur.com/beWVs.jpg) I am trying to do the following. when United states is selected as a country, the state field will show. The problem is that when i use the tab key on the keyboard, it is skipping the state field and its going on the users field. So i tried using the focus property so when i select United states, the state will show + selected, but I had no luck.. Below please find the code I am using ``` $(document).ready(function () { $("#cmbCountries").change(function () { $("#cmbCountries option:selected").each(function () { if ($(this).text() == "United States") { $("#cmbstate").show(); $("#cmbstate").focus(); } else { $("#cmbstate").hide(); } }); }).change(); }); ``` Any help please?
javascript focus problem
CC BY-SA 2.5
null
2011-03-04T13:59:29.363
2011-03-04T15:07:55.997
null
null
414,847
[ "javascript", "jquery" ]
5,195,000
1
5,200,834
null
0
563
I've seen this behavior for years. Checkboxes and radios buttons can not be covered by DIV elements. No matter what z-index use.Is there some solution? Besides, I am using simpletip (can't use qtip). If you know about another jquery tooltip ready to use that work around this... I have my wallet open. THX ![enter image description here](https://i.stack.imgur.com/TZ2gJ.png)
z-index bad behaviour over some HTML elements
CC BY-SA 2.5
0
2011-03-04T14:27:12.430
2011-03-05T00:47:44.797
2020-06-20T09:12:55.060
-1
333,061
[ "css", "tooltip" ]
5,195,142
1
5,226,465
null
0
1,057
Inside of Visual Studio my Silverlight Business Application works fine. But when I publish it to my local machine's IIS (version 6.1), it runs fine, but doesn't seem to be able to access the RIA services. The first error to pop up is: ![enter image description here](https://i.stack.imgur.com/DUQZK.png) The application otherwise works fine. It navigates fine. That is, until it tries to access data from the server through RIA services. I get messages like: ![enter image description here](https://i.stack.imgur.com/1NVZG.png) I know very little about deploying web applications, let alone silverlight applications with RIA services. I published using the following settings: ![enter image description here](https://i.stack.imgur.com/pHkeh.png) I've used fiddler to get the exact error after realizing that the "NotFound" exception could be anything. It is as follows. --- ## Server Error in '/PPCa' Application. The resource cannot be found. HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. /PPCa/login.aspx --- I don't have a login.aspx page. Is this something internal to Silverlight? Do I need to create such a page?
Why is it that I cannot deploy my otherwise working Silverlight application
CC BY-SA 2.5
null
2011-03-04T14:38:21.913
2011-03-09T15:12:58.230
2011-03-04T15:55:06.947
443,602
443,602
[ "silverlight", "deployment", "wcf-ria-services" ]
5,195,384
1
5,195,659
null
1
112
can someone please identify what type of view this is, as i want to implement it. but have just moved over to ipad from iphone and have no idea Thanks ![Ipad view](https://i.stack.imgur.com/LpgL8.png)
What type of view Is this, (Ipad Related)
CC BY-SA 2.5
null
2011-03-04T15:02:21.603
2011-03-04T15:24:22.750
null
null
307,040
[ "objective-c", "ipad" ]
5,195,367
1
5,195,423
null
17
66,550
I have a web site like this: ``` <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link rel="stylesheet" type="text/css" href="article_style.css" /> </head> <body> <div class="section"> <!--<h1>header</h1>--> <div> paragraph </div> <div> paragraph </div> <div> paragraph </div> </div> <div class="section"> <div> paragraph </div> <div> paragraph </div> <div> paragraph </div> </div> </body> </html> ``` and this is CSS: ``` div.section { border: 1px solid black; } div.section div:nth-child(even) { color: Green; } div.section div:nth-child(odd) { color: Red; } ``` And this is the result: ![result](https://i.stack.imgur.com/RzVNq.png) This is OK because I get red for odd div and green for even in section. But when I add header at the begginig of first section (commented code in sample) I get this: ![result2](https://i.stack.imgur.com/WnwAf.png) I don't want that. I want the to have like before, but just with a header in first section. So at first header and then red paragraph.
Problem with odd/even child elements in nth-child
CC BY-SA 2.5
0
2011-03-04T15:00:25.963
2013-04-03T16:47:35.940
2011-03-04T15:21:01.090
405,015
350,384
[ "css", "html", "css-selectors" ]
5,195,460
1
5,196,858
null
8
7,050
Does somebody know a good multilanguage spell checker for C# - .NET? I mean, I have [googled](http://www.google.es/#hl=es&sa=X&ei=agBxTYKYKsaYhQfr68E_&ved=0CBoQBSgA&q=spell+checker+C%23&spell=1&fp=30ac618ed16d8cea) it and I found some alternatives, but does someone have a good success story with one? I need to add a spell checker to my application. I would like a library that integrates with `System.Windows.Forms.TexBox`, for example. Also, my application is portable to Linux, Mac, (`using Mono`), so it should be 100% managed code. --- I'm looking for something that underlines with a red line a wrong word in the textbox and also proposes corrections in a contextmenu: ![enter image description here](https://i.stack.imgur.com/c18RI.png)
Spell checker for .NET / C#
CC BY-SA 3.0
0
2011-03-04T15:08:10.323
2012-05-24T19:22:16.760
2012-05-24T19:22:16.760
67,097
402,081
[ "c#", ".net", "spell-checking" ]
5,195,666
1
null
null
1
2,292
I'm having trouble on deserializing xml node which has xsi:type attribute. Part of the code: ``` [XmlElement("ValueObject")] public object ValueObject { get {... } set {... } } ``` after serialization ![http://imgur.com/uEJ1s](https://i.stack.imgur.com/T4mGZ.jpg) The value could be serialized fine(pictured), but when it was deserialized the ValueObject has no type information but System.Xml.XmlNode[3]. This was on .net fx 4.0, C# Any ideas why? Thanks,
xsi:type deserialization issue
CC BY-SA 3.0
null
2011-03-04T15:24:46.347
2011-12-04T00:14:12.880
2011-12-04T00:14:12.880
84,042
354,255
[ "xml", "xml-deserialization", "xsitype" ]
5,196,333
1
5,197,130
null
10
29,603
I'm a civil engineer designing a program that allows the user to define number of cross sections of a roadway and then calculate the quantity of the different materials used to build the roadway layers. I need to be able to plot a representation of the cross section that the users has defined. I'm not sure if this would be best accomplished by plotting various series on a chart, or drawing shape objects. Does anyone have any thoughts? ![Typical Roadway Section](https://i.stack.imgur.com/eiFB4.png)
What is the best way to draw in Excel using VBA?
CC BY-SA 2.5
0
2011-03-04T16:12:01.550
2011-03-12T08:03:53.587
2011-03-12T08:03:53.587
149,573
520,332
[ "vba", "excel" ]
5,196,424
1
5,196,591
null
10
10,997
Here's what I'm seeing for the markup provided below. None of the browsers are keeping the textareas in the container which is inconvenient but not that big of an issue. However, what is annoying is that no matter what I do I can't get rid of the bottom margin for the textarea in Chrome. Any suggestions? ![Textarea handling in different browsers](https://i.stack.imgur.com/Hai3t.png) Here is everything in a fiddle: [http://jsfiddle.net/radu/RYZUb/](http://jsfiddle.net/radu/RYZUb/) Markup: ``` <div id="wrap"> <textarea id="txtInput" rows="6" cols="20"></textarea> <div id="test"></div> </div> ``` CSS: ``` #wrap { background-color:green; height:210px; width:440px; } #txtInput { height:100px; width:100%; margin:0px; padding:0px; } #test { background-color:gray; height:100px; width:100%; margin:0; padding:0; } ```
Inconsistent textarea handling in browsers
CC BY-SA 2.5
0
2011-03-04T16:19:26.860
2011-03-04T16:46:46.010
2011-03-04T16:31:49.217
383,744
383,744
[ "html", "css", "cross-browser", "textarea" ]
5,196,471
1
5,196,841
null
2
3,094
Can anyone provide me with a link to a tutorial or plugin, preferably in jQuery that will allow me to create a menu that not only collapses vertically (jQueryUI's Accordian), but also collapses horizontally? No matter what I google, all I can find are the vertical ones, and the Wordpress one is super-integrated to its core, as far as I can tell. EDIT: Here are some screenshots. The first is normal, the second is expanded / collapsed vertically, the third is collapsed horizontally. ![enter image description here](https://i.stack.imgur.com/4azIZ.png) ![enter image description here](https://i.stack.imgur.com/ItkFI.png) ![enter image description here](https://i.stack.imgur.com/Y9JFO.png)
Wordpress Admin-Like Menu
CC BY-SA 2.5
0
2011-03-04T16:23:57.633
2012-08-23T14:30:43.830
2011-03-04T16:50:47.673
420,001
420,001
[ "javascript", "jquery", "css", "wordpress", "menu" ]
5,196,558
1
5,196,593
null
1
6,704
In my current project I am unable to set the "Other Linker Flags" as I have in others projects. No matter what I put in the "Other Link Flags" section of my xcode project settings it does not show up in the detailed build log, and the desired linking does not happen: ![Other Link Flags](https://i.stack.imgur.com/VGDul.png) > Ld build/Debug-iphonesimulator/MyProject.app/MyProject normal i386 cd /Users/theUser/Development/xm8vc/MyProject/trunk setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -L/Users/theUser/Development/xm8vc/MyProject/trunk/build/Debug-iphonesimulator -L/Users/theUser/Development/xm8vc/MyProject/trunk -F/Users/theUser/Development/xm8vc/MyProject/trunk/build/Debug-iphonesimulator -F/Users/theUser/Development/xm8vc/MyProject/trunk -filelist /Users/theUser/Development/xm8vc/MyProject/trunk/build/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/i386/MyProject.LinkFileList -mmacosx-version-min=10.6 -lxml2 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -framework QuartzCore -framework AVFoundation -framework AddressBook -framework AddressBookUI -framework AudioToolbox -framework OpenGLES -framework CFNetwork -framework SystemConfiguration -framework MediaPlayer -lxml2 -lz -framework SpeechKit -o /Users/theUser/Development/xm8vc/MyProject/trunk/build/Debug-iphonesimulator/MyProject.app/MyProject Is there something that would cause xcode to ignore the "Other Linker Flags?"
Xcode ignoring Other Linker Flags
CC BY-SA 2.5
0
2011-03-04T16:31:28.470
2011-03-04T16:34:21.577
null
null
64,272
[ "xcode", "linker" ]
5,196,893
1
5,196,924
null
1
834
I am using an array to hold the results of an SQLite query, at the moment I am using a two dimensional table to do this. The problem that I have is that I have to manually specify the size of one of the indexes before the array can be used but it feels like a waste as I have no real knowledge of how many rows will be returned. I do use a property which allows me to retrieve the amount of columns that are present which is used in the arrays initialisation. ``` using (SQLiteDataReader dr = cmd.ExecuteReader()) { results = new object[10,dr.FieldCount]; while (dr.Read()) { jIterator++; for (int i = 0; i < dr.FieldCount; i++) { results[jIterator, i] = dr.GetValue(i); } } } //I know there are a few count bugs ``` ![Array contents](https://i.stack.imgur.com/HQAHd.jpg) I simply add the data to the array for as long as the while loop returns true, in this instance I set the first index to 10 as I already know how many elements are in the database and 10 will be more than enough. How would I go about changing the array so it's size can be dynamic, Is this even possible based on the way I am getting the database results?
Initialising array to a dynamic size - C#
CC BY-SA 2.5
null
2011-03-04T17:05:55.043
2011-03-04T17:25:58.563
null
null
218,159
[ "c#", "sqlite", "multidimensional-array", "system.data.sqlite" ]
5,196,945
1
5,197,031
null
2
1,057
![enter image description here](https://i.stack.imgur.com/ZdGf1.gif) In this layout it's not valid because H1 isn't the first rendered head element... is this a terrible sin or is it ok? Any way to fix this? Both columns are variable length so I don't see any way round this. Someone asked me to citate this: [http://www.w3.org/WAI/ER/IG/ert/ert-19991221.html#Technique3.5.A](http://www.w3.org/WAI/ER/IG/ert/ert-19991221.html#Technique3.5.A) > Header elements (H1-H6) should be checked to ensure they are nested according to the following rules The first header element in the document must be H1 There must be only one H1 element in the document Header levels must not increase by more than 1 level. Example: H2 following H1 is good. H3 following H1 is bad. Header elements can decrease by any level. Example: H2 following H5 is OK.
HTML head tags in wrong order
CC BY-SA 2.5
null
2011-03-04T17:10:34.163
2011-03-04T19:14:04.097
2011-03-04T17:34:20.777
102,441
356,635
[ "html", "css", "header", "semantics" ]
5,197,084
1
null
null
4
1,275
I have a grid (not necessarily a square but I drew it as a square to simplify it) and certain values associated with each of the smaller squares. Given a circle of radius `x`, I am trying to find the region where the sum of the values is the maximum. The following picture will make it clear: ![enter image description here](https://i.stack.imgur.com/KDGbI.jpg) My guess here is that if a plane is divided into a grid using a large number of small squares, approximating the circle to a square will only lead in some over-approximation which is ok to me initially because I have not yet finalized how to address the case of a circle overlapping with a partial square (what would its value be?). The simplest approach I can think of is brute-force: Start perhaps at the lower left and start moving in a zig-zag path until we hit the top-right and output the region with the maximum sum. I am fine with this approach but for large plane regions, there will be huge number of squares and at some might this approach might prove expensive. I am not sure if there is a better way of solving this problem but I would really appreciate if anyone had other thoughts on how to go about solving this.
Better way to solve this grid-search problem?
CC BY-SA 2.5
0
2011-03-04T17:22:57.183
2011-03-05T05:07:59.037
2011-03-04T18:45:01.233
238,419
184,046
[ "algorithm", "optimization", "search", "artificial-intelligence", "max" ]
5,197,254
1
null
null
0
289
I would like to make a support plug-ins in my program. For example in my program there are several tabs in one tab is the editor in which the code is written also in that tab has a button run. After pressing the button run occurs a compilation of source code and its execution. The results of work are displayed in the other tab. I would like to find such a component in which there are: Syntax Highlighting, Debugger, Analogue of solution explorer --- Thank you very much for your answers. I would like to bring more of clarity to my question. I want to do something similar to that is shown in the screenshots below ![Screenshot 1](https://i.stack.imgur.com/JweeY.jpg) ![Screenshot 2](https://i.stack.imgur.com/l3KJX.jpg) On a single tab there is the editor and at the other tab displays the results. To write plug-ins I'd like to use C #.
Components for WPF similar to the simplified Visual Studio
CC BY-SA 3.0
null
2011-03-04T17:36:58.843
2012-02-21T15:15:07.560
2012-02-21T15:15:07.560
null
645,177
[ "c#", "visual-studio", "wpf-controls" ]
5,197,679
1
5,197,751
null
1
5,880
I work for [http://pastebin.com](http://pastebin.com) and we have a facebook LIKE button on the site. The LIKE button in the menu on the bottom right puts a LIKE out to our frontpage. Now the LIKE gets stored, but the data about pastebin is all messed up. It fetches some http header data, and posts that. It only happens with the LIKE button in the menu on the right, the LIKE button at the top of posts works fine. [http://pastebin.com/cYkKMdT7](http://pastebin.com/cYkKMdT7) like the one at the top there. This is how it gets pasted to peoples wall. ![enter image description here](https://i.stack.imgur.com/FADqB.png) Any idea why this happens? I tried both the iframe and the javascript code.
Facebook Like Button Fetches Wrong Website Data
CC BY-SA 2.5
0
2011-03-04T18:21:01.917
2013-07-01T15:05:34.140
null
null
415,020
[ "facebook", "facebook-like" ]
5,197,695
1
5,198,323
null
4
25,805
It's been a long time since I've dabbled with C#, but I'm having a heck of a time getting my `form_load` to fire. This is the most simple thing I can't imagine why it won't fire! Any assistance would be appreciated. ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace AppName_v4._0___TestRoom_Addon{ public partial class Form1 : Form{ public Form1() { InitializeComponent(); this.Load += new EventHandler(this.Form1_Load); //FIRES! } private void Form1_Load(object sender, EventArgs e) { webKitBrowser1.Dock = DockStyle.Fill; //DOES NOT FIRE! webKitBrowser1.Navigate("http://192.168.0.10/?zoneid=11"); } } } ``` - - ![Screenshot of resulting Form](https://i.stack.imgur.com/Sm6jo.png) I have also tried the following with no success: ``` namespace AlphaEntry_v4._0___MailRoom_Addon{ public partial class Form1 : Form{ public Form1() { InitializeComponent(); } protected override void OnLoad(EventArgs e) { webKitBrowser1.Dock = DockStyle.Fill; webKitBrowser1.Navigate("http://192.168.0.10/?zoneid=11"); base.OnLoad(e); } } } ``` I was able to get this working by removing and re-adding the references to the WebKit Control. Not sure what happened. Thanks everyone.
Form1_Load not firing even after adding handler
CC BY-SA 4.0
null
2011-03-04T18:22:47.130
2021-08-26T13:36:37.717
2021-01-08T10:37:28.663
8,873,143
83,809
[ "c#", "winforms", "event-handling", "form-load" ]
5,197,925
1
5,197,961
null
2
3,027
I am seeing a strange issue when fetching a JSON object from a URL using Jquery $.ajax function. I am using the following JQuery call to retrieve the JSON object: ``` 1 $.ajax({ 2 url: '/test/getjson', 3 success: function(data){ 4 doSomething(data); //(breakpoint here) 5 }, 6 error: function(x,y,z){ 7 //error.. 8 } 9 }); ``` The URL '/test/getjson' returns the following JSON object (Here is what the response looks like in Firebug): ``` { "rsp": { "date": "1299195954782" , "type": "Type1" , "Main": { "Category1" : { "private" : "Y" , "properties" : { "one" : { "response" : "" , "text" : "label" , "type" : "property" }, "two" : { "options" : [ "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "10" ], "response" : "1" , "text" : "label2" , "type" : "property2" } } }, "username" : "spiderman" } } } ``` ## Problem The problem is that all arrays in the JSON object have extra values with keys 'remove' and '__proto__' after being parsed by JQuery (Firebug's Debugger viewing JSON data object, breakpoint at line 4 in the JS snippet above): ![enter image description here](https://i.stack.imgur.com/AoULr.png) [JSON object as seen by Firebugs debugger] And here is a closer look at the strange part of the JSON object: ![enter image description here](https://i.stack.imgur.com/SVRjs.png) [Closer look at the unknown data] Thanks ahead everyone :)
JQuery JSON parsing / AJAX issue ('remove' and '__proto__' keys in arrays?)
CC BY-SA 2.5
0
2011-03-04T18:43:26.340
2011-03-05T17:06:18.237
2011-03-05T17:06:18.237
315,935
645,251
[ "javascript", "jquery", "json", "parsing" ]
5,198,155
1
5,271,634
null
4
2,950
My view has a `CATiledLayer`. The view controller has custom zooming behavior, so on `-scrollViewDidEndZooming` every tile needs to be redrawn. But, even though `-setNeedsDisplay` is being called on the layer after every zoom, not all tiles are being redrawn. This is causing the view to sometimes look wrong after a zoom. (Things that should appear in just 1 tile are appearing in multiple places). It often corrects itself after another zoom. Here's the relevant code. `updatedRects` is for testing -- it stores the unique rectangles requested to be drawn by `-drawLayer`. CanvasView.h: ``` @interface CanvasView : UIView @property (nonatomic, retain) NSMutableSet *updatedRects; @end ``` CanvasView.m: ``` @implementation CanvasView @synthesize updatedRects; + (Class)layerClass { return [CATiledLayer class]; } - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)context { CGRect rect = CGContextGetClipBoundingBox(context); [updatedRects addObject:[NSValue valueWithCGRect:rect]]; CGContextSaveGState(context); CGContextTranslateCTM(context, rect.origin.x, rect.origin.y); // ...draw into context... CGContextRestoreGState(context); } @end ``` MyViewController.m: ``` @implementation MyViewController - (void)viewDidLoad { [super viewDidLoad]; canvasView.updatedRects = [NSMutableSet set]; } - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale { canvasView.transform = CGAffineTransformIdentity; canvasView.frame = CGRectMake(0, 0, canvasView.frame.size.width * scale, canvasView.frame.size.height); [self updateCanvas]; } - (void)updateCanvas { NSLog(@"# rects updated: %d", [canvasView.updatedRects count]); [canvasView.updatedRects removeAllObjects]; canvasView.frame = CGRectMake(canvasView.frame.origin.x, canvasView.frame.origin.y, canvasView.frame.size.width, myHeight); CGFloat tileSize = 256; NSLog(@"next # rects updated will be: %f", [canvasView.layer bounds].size.width / tileSize); [canvasView.layer setNeedsDisplay]; } @end ``` When testing this, I always scrolled all the way across the view after zooming to make sure every tile was seen. Whenever the view looked wrong, the predicted "next # of rects updated" was greater than the actual "# of rects updated" on the next call to `-updateCanvas`. What would cause this? Here's a better way to visualize the problem. Each time `updateCanvas` is called, I've made it change the background color for drawing tiles and record the time it was called -- the color and time are stored in `canvasView`. On each tile is drawn the tile's rectangle, the tile's index along the x axis, the time (sec.) when the background color was set, and the time (sec.) when the tile was drawn. If everything is working correctly, all tiles should be the same color. Instead, here's what I'm sometimes seeing: ![Screenshot of tiles with mismatched colors](https://i.stack.imgur.com/k2BjY.png) ![Screenshot of tiles with mismatched colors](https://i.stack.imgur.com/6GzNS.png) I only seem to see wrong results after zooming out. `scrollViewDidEndZooming``updateCanvas` (: No-- not called multiple times.)
Not all tiles redrawn after CATiledLayer -setNeedsDisplay
CC BY-SA 2.5
0
2011-03-04T19:09:35.740
2011-03-11T10:19:30.637
2011-03-09T17:29:01.807
238,387
238,387
[ "iphone", "cocoa-touch", "ipad", "ios", "catiledlayer" ]
5,198,409
1
5,199,035
null
0
2,252
I am currently auditing the user actions on a project and I am having the following Issue. There is a functionality called , which lists the complete set of Audited actions performed by the user on my system. Whenever a certain user lists the this action needs to be Audited as well. The JSF page the Audit Log is made is the following: ``` <ui:composition ...> <ui:define name="content"> <h:form id="audit_List"> <h:panelGrid columns="1"> <p:breadCrumb> <p:menuitem value="#{i18n['xxx']}" url="index.xhtml" /> <p:menuitem value="#{i18n['yyy']}"/> </p:breadCrumb> <p:panel header="#{i18n['zzz']}"> <p:dataTable var="auditEntry" value="#{auditList.allAuditEntries}" paginator="true" rows="10" paginatorPosition="top" dynamic="false"> <p:column sortBy="#{i18n[auditEntry.category]}" filterBy="#{i18n[auditEntry.category]}"> A column here </p:column> <p:column sortBy="#{auditEntryDescriptionI18N[auditEntry]}" filterBy="#{auditEntryDescriptionI18N[auditEntry]}"> A column here </p:column> <p:column sortBy="#{auditEntry.username}" filterBy="#{auditEntry.username}"> A column here </p:column> <p:column id="problematicColumn" sortBy="#{auditEntry.occurredOn}" filterBy="#{auditEntry.occurredOn}"> <f:facet name="header"> <h:outputText value="#{i18n['aaa']}"/> </f:facet> <h:outputText value="#{auditEntry.occurredOn}"> <f:convertDateTime type="date" ___I suspect pattern is giving the problem..___ pattern="{auditList.listDateFormat.stringValue}" timeZone="#{sessionBean.serverTimeZone}"/> </h:outputText> </p:column> </p:dataTable> </p:panel> </h:panelGrid> </h:form> </ui:define> </ui:composition> ``` I have currently the Auditing action on the particular code snippet: ``` <p:dataTable var="auditEntry" value="#{auditList.allAuditEntries}" paginator="true" rows="10" paginatorPosition="top" dynamic="false"> ``` My backing bean: ``` public List<AuditEntry> getAllAuditEntries() { auditFacade.createAuditEntry(function that creates an audit entry); return allAuditEntries; } ``` The problem of performing the auditting on the named action of the backing bean is the following: ![Flooded Audit Log 1](https://i.stack.imgur.com/XdBXi.png) ![Flooded Audit Log 2](https://i.stack.imgur.com/ZJaB2.png) Need a way to have the registration of consulting the just once, and not as it is being shown on the images. Any ideas? Any way to user a JSF or related tag that will guarantee the above? TL;DR Having just a PrimeFaces DataTable on a JSF page, how to audit the opening of such page in a way to have the audit registration on a single row, not as shown on the images. Pd: It isnt feasible to re-edit all the repetitive audit entries filtering them by time difference
Action Audit on a JSF with just a Primefaces DataTable
CC BY-SA 2.5
0
2011-03-04T19:37:17.513
2011-03-04T20:41:26.710
2011-03-04T20:12:13.460
583,673
583,673
[ "java", "jsf", "datatable", "primefaces", "audit" ]
5,198,961
1
5,199,217
null
1
108
Recently at work, I was tasked with implementing a URL shortener for my department to use internally. We're largely a ASP.NET MVC shop (whenever possible), so naturally I gravitated towards the open source [http://shrinkr.codeplex.com/](http://shrinkr.codeplex.com/). However, Entity Framework is foreign to me and I have no idea how to actually get this up and running. I've created a SQL08R2 database for it, and passed it (what should be) a valid connection string: ``` <add name="Shrinkr" connectionString="Data Source=sql08r2.myFQDN;Initial Catalog=Shrinkr;Integrated Security=True" providerName="System.Data.SqlClient" /> ``` Building and running it in Debug mode yields the following error: ![alt](https://i.stack.imgur.com/mvfoP.png) Of course, my database is empty and has no table structure. I just can't figure out how the heck to get the database populated with the correct initial schema. I've heard that EF can autogenerate the database, but I'm not sure if that applies in this case. If there is a SQL file in the Shrinkr release to get the DB up and running, I sure as heck can't find it. I've been banging my head against my desk for a few days now on this and I can't figure out what I'm missing!
Attempting to build and run Shrinkr using Entity Framework
CC BY-SA 2.5
null
2011-03-04T20:34:01.590
2011-03-04T21:01:48.513
2011-03-04T20:38:41.757
1,583
239,340
[ "asp.net-mvc", "entity-framework", "asp.net-mvc-2", "sql-server-2008" ]
5,199,065
1
5,199,325
null
3
525
I posted at [this post](https://stackoverflow.com/questions/5148491/how-to-animate-3d-plot-given-a-rotation-axis-in-mathematics) before, but I still could not solve the following problem completely. As an example: ``` {pA, pB, pC, pD} = {{0, 0, Sqrt[61/3]}, {Sqrt[7], 4*Sqrt[2/3], 0}, {0, -5*Sqrt[2/3], 0}, {-Sqrt[71], 4*Sqrt[2/3], 0}}; axis={1,0,0};pt={0,1,0}; plotPolygon[{a_, b_, c_}] := {Opacity[.4], Polygon[{a, b, c}]}; graph=Graphics3D[{plotPolygon[{pA, pB, pC}], plotPolygon[{pA, pB, pD}], plotPolygon[{pB, pC, pD}], plotPolygon[{pA, pC, pD}]}, Axes -> True, AxesOrigin->pt]; Animate[graph/.gg : Graphics3D[___] :> Rotate[gg, theta, axis], {theta, 0., 2.*Pi}] ``` ![enter image description here](https://i.stack.imgur.com/PaKX4.gif) I want to rotate along an axis `axis={1,0,0}` which passes the point `pt={0,1,0}`. But I don't know how to specify the point information. Also the rotation animation seems very chaotic in the sense that I would expect at least one point (in this case, the origin?) is not rotating.
animate 3d plot with some further requirements in mathematica
CC BY-SA 3.0
0
2011-03-04T20:44:49.610
2012-01-03T20:43:52.770
2017-05-23T10:30:24.107
-1
534,617
[ "wolfram-mathematica" ]
5,199,223
1
5,204,021
null
3
6,881
![This what it looks like](https://i.stack.imgur.com/pHxb2.png) this is my stylesheet: ``` QLineEdit#SearchBarEditBox { background: white; background-image: url(:/images/magnifyingGlass.png); background-repeat: no-repeat; background-position: 5px 5px; } ``` My Problem: "background-position" only receives "top/bottom/right/left" values. Any attempt to use a numerical absolute value results immediately in a "top center" justification for my image. Going crazy here....
Annoying Background-Position problem
CC BY-SA 2.5
null
2011-03-04T21:02:34.940
2019-10-23T20:13:09.427
null
null
282,918
[ "qt" ]
5,199,321
1
5,199,605
null
0
261
On a web page I am using a jquery button. This code produces the button: ``` <button type="submit">Update</button> ``` This is how it looks, it is a little too big for the line: ![enter image description here](https://i.stack.imgur.com/o2hB9.png) Is there an inline CSS statement that can make this smaller? Inline is preferred is possible. Thank you
Regarding jQuery buttons, is it possible to make one smaller than the regular size?
CC BY-SA 2.5
null
2011-03-04T21:12:58.350
2011-03-04T21:42:53.143
2011-03-04T21:16:39.893
83,809
1,267,363
[ "css" ]
5,199,494
1
5,199,529
null
0
188
Scrape Data in C# from images ![enter image description here](https://i.stack.imgur.com/qerP3.png)
Scrape Data in C# from images
CC BY-SA 2.5
null
2011-03-04T21:29:28.707
2011-03-04T21:33:30.653
null
null
564,184
[ "c#" ]
5,199,548
1
null
null
1
1,328
I'm writting small application to draw diagrams and I need to find points to draw bezier curve between two elements. Is there any efficient and simple way to calculate bending points ?? To better visualize my problem please take a look at this picture ![enter image description here](https://i.stack.imgur.com/vanm8.png) As You can see I have two rectangles which I want to connect with bezier curve. It is obvious that I have two anchor points, but how can I calculate correctly bending points so that this line would look like at the picture.
How to find proper points to draw bezier curves in wpf
CC BY-SA 2.5
null
2011-03-04T21:36:35.677
2011-03-04T23:06:29.060
null
null
635,807
[ "wpf", "drawing", "bezier" ]
5,199,717
1
5,205,956
null
8
15,116
I have a WPF Datagrid binded to some properties in my ViewModel ``` <DataGrid AutoGenerateColumns="False" Name="dataGrid" SelectionMode="Single" ItemsSource="{Binding ItemList}" SelectedItem="{Binding SelectedItem}"> ... </DataGrid> ``` When my window load and the Datagrid too, I set the `SelectedItem` and it binds fine but the row isn't highlighted. The moment I click a row, the row highlight and the problem is resolved. How can I set/trigger the highlighting of the `SelectedItem` in the DataGrid on load/initialization ? It's actually selected because I have the little selection cell. It's just the rendering of the Highlighting that does not trigger. ![enter image description here](https://i.stack.imgur.com/evTDT.png)
WPF Datagrid : On load, selection on current item (highlighting)
CC BY-SA 2.5
null
2011-03-04T21:53:46.030
2018-07-23T09:46:09.023
2011-03-04T22:24:36.187
399,769
399,769
[ "wpf", "datagrid", "initialization", "selection", "highlighting" ]
5,199,827
1
null
null
2
1,113
I recently encountered an issue with NSIS that I believe is related to an interaction with UAC, but I am at a loss to explain it and I do not know how to prevent it in the future. I have an installer that creates and removes IIS virtual directories using the NsisIIS plugin. The installer appeared worked correctly on my Windows 7 workstation. When the installer was run on a Windows 2008 R2 server it installed properly, but the uninstaller removed all of the virtual directories and put IIS is an unusable state; to the point that I had to remove the Default Web Site and re-add it. What I eventually found was that all of the IIS configuration files under `C:\Windows\System32\inetsrv\config` had a lock icon on them. ![Screenshot of IIS config files after NSIS runs](https://i.stack.imgur.com/6259B.png) Some [investigation](http://www.idnetters.co.uk/forums/index.php?topic=23852.0) seem to indicate that this means a user account has taken ownership of the file, however all the files listed `SYSTEM` as the file owner. I did check a different server that I have not run the installer on, and it does have the lock icon applied to the IIS files. I have also seen the same lock icon appear on other files that the NSIS installer creates. For instance, I have a `Web.Config.tpl` file that is processed using the NSIS ReplaceInFile which also appears with the lock icon after the installer finished. ![locked web.config file after installer runs](https://i.stack.imgur.com/BKJPQ.png) After I explicitly grant another user account access to the file, the lock icon goes away. ![After adding the IUSR to the file](https://i.stack.imgur.com/12R6P.png) I run the installer under the local Administrator account on the 2008 R2 server, so I do not get the UAC prompt. Here is the relevant code from the `install.nsi` file ``` RequestExecutionLevel admin Section "Application" APP_SECTION SectionIn RO Call InstallApp SectionEnd Section "un.Uninstaller Section" Delete "$PROGRAMFILES\${PROGRAMFILESDIR}\Uninstall.exe" Call un.InstallApp SectionEnd Function InstallApp File /oname=Web.Config Web.Config.tpl !insertmacro ReplaceInFile Web.Config %CONNECTION_STRING% $CONNECTION_STRING FunctionEnd Function un.InstallApp ReadRegStr $0 HKLM "Software\${REGKEY}" "VirtualDir" NsisIIS::DeleteVDir "$0" Pop $0 FunctionEnd ``` I have three questions stemming from this incident: 1. How did this happen? 2. How can I fix my installer to prevent it from happening again? 3. How can I repair the permissions on the IIS config files.
NSIS takes ownership of IIS system files
CC BY-SA 2.5
null
2011-03-04T22:05:30.340
2011-03-08T03:55:15.160
2011-03-07T02:10:41.917
332,406
332,406
[ "iis-7", "uac", "nsis", "file-permissions", "windows-server-2008-r2" ]
5,199,911
1
5,442,992
null
9
17,582
Mozilla Thunderbird's Calendar extension, Lightning, will use different colors for different calendars, and just use a narrow vertical bar for the category color: (Light blue as calendar color and red as category color) ![enter image description here](https://i.stack.imgur.com/XOzRi.png) What I would like to find out is how I could go about changing/"hacking" the css styles that - surely - must be associated with this, buried somewhere in the plugin directory, so that in the example above, the event would be fully colored red. Anyone know how to achieve this?
How can I "hack" the Thunderbird Lightning extension to fully color categories
CC BY-SA 3.0
0
2011-03-04T22:18:49.713
2022-12-18T14:23:13.333
2012-06-12T20:04:11.227
785,541
321,013
[ "css", "thunderbird", "thunderbird-addon", "thunderbird-lightning" ]
5,200,249
1
5,200,383
null
3
298
I want to study some "strange" functions by plotting them out in mathematica. One example is the following: ``` mod2[x_] := Which[Mod[x, 2] >= 1, -2 + Mod[x, 2], True, Mod[x, 2]]; f[x_] := Which[-1 <= x <= 1, Abs[x], True, Abs[mod2[x]]]; fn[x_, n_] := Sum[(3/4)^i*f[4^n*x], {i, 0, n}] Plot[{fn[x, 0], fn[x, 1], fn[x, 2], fn[x, 5]}, {x, -2, 2}] ``` However, the plot I got from mma is misleading, in the sense that the maxima and minima of `fn[x, 5]` should be on the same two levels. But due to high oscillation of the function, and the fact that clearly mma only takes limited number of points to draw the function, you see the plot exhibit strange behavior. Is there any option in plot to remedy for this? ![plot of fn](https://i.stack.imgur.com/7d2NJ.png) Many thanks.
misleading plot issue in mathematica
CC BY-SA 2.5
null
2011-03-04T23:06:00.350
2011-03-04T23:24:14.967
null
null
534,617
[ "wolfram-mathematica" ]
5,200,314
1
5,201,547
null
6
2,243
I'm developping a . I created this interface with . Please look at these pictures. ![enter image description here](https://i.stack.imgur.com/phZWK.png) ![enter image description here](https://i.stack.imgur.com/CwB2U.png) At first time, there's only one element, the user have to enter informations (title and description) then he starts adding elements as he needs. He can edit elemnt infomrations at any time. He can too delete or change the order of this elements ... How can I do to create something like the pictures up????? Thanks in advance. Best regards, ## Ali. I know these parts in Java Swing. My problem is how to insert this block of buttons dynamically. ![enter image description here](https://i.stack.imgur.com/phZWK.png) I get an idea, I must put JButtons on a JPanel then manipulate the JPanel by adding, removing and reodering... So a Grid Layout will be efficient to add each panel after each one, but thinking on reordering the order will be so hard ... Any suggestions please. :) --- After searching, I get an idea: ![enter image description here](https://i.stack.imgur.com/phZWK.png) Let us put these JButtons in a JPanel called btnsUnit, then manipulate it by adding, removing and reodering... So a GridLayout will be efficient to add each JPanel after each one .. Thats why I created a new JPanel which will contain an unknown number of ListbtnsUnit JPanel, I fixed 10 as the max number. I'm just doing these steps when you reply me. I didn't arrived to add btnsUnit JPanel in ListbtnsUnit JPanel. ``` import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import java.awt.Color; import java.awt.GridLayout; import javax.swing.JButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JTextField; public class setupDeviceList extends JFrame { private JPanel contentPane; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { setupDeviceList frame = new setupDeviceList(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public setupDeviceList() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 742, 335); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); final JPanel ListbtnsUnit = new JPanel(); ListbtnsUnit.setBackground(Color.RED); ListbtnsUnit.setBounds(55, 56, 243, 191); contentPane.add(ListbtnsUnit); ListbtnsUnit.setLayout(new GridLayout(10, 0)); final JButton btnAdd = new JButton("Add"); btnAdd.setBounds(161, 11, 56, 23); btnAdd.setVisible(true); btnAdd.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { final JPanel btnsUnit = new JPanel(); btnsUnit.setBounds(343, 71, 243, 147); contentPane.add(btnsUnit); btnsUnit.setBackground(Color.ORANGE); btnsUnit.setLayout(null); btnsUnit.add(btnAdd); ListbtnsUnit.add(btnsUnit); ListbtnsUnit.revalidate(); ListbtnsUnit.repaint(); } }); } } ``` ![enter image description here](https://i.stack.imgur.com/CwB2U.png) Please can you help me in this code. I need just the first push to go on.
Java App - Add, Delete, Reorder elements of the JButtons
CC BY-SA 3.0
0
2011-03-04T23:13:42.440
2016-06-02T17:14:15.553
2016-06-02T17:14:15.553
1,601,729
604,156
[ "java", "swing", "user-interface", "jpanel", "jbutton" ]
5,200,410
1
5,200,697
null
1
79
after the start of the eclipse, it shows me an error dialog(see the image):![enter image description here](https://i.stack.imgur.com/sbzfI.png) Can some one tell me how to resolve that problem.
eclipse error after the loading
CC BY-SA 2.5
null
2011-03-04T23:27:06.803
2011-03-05T12:38:16.683
null
null
604,019
[ "eclipse", "eclipse-plugin" ]
5,200,521
1
5,201,373
null
1
2,165
I just recently started making apps for OSX desktops and I want to have the users click a button and a window come up, similar to the following screenshots. What is that window that comes up called? You can't quit the application when you're entering the information. I tried looking for ways to make an NSAlert do this, but I was way off. Can someone please point me in the right direction? Thanks in advance! ![enter image description here](https://i.stack.imgur.com/VuFKM.png) ![enter image description here](https://i.stack.imgur.com/kJ49m.png)
Modal window Cocoa app
CC BY-SA 2.5
0
2011-03-04T23:45:54.180
2011-03-05T03:06:54.813
null
null
345,282
[ "objective-c", "cocoa", "macos", "osx-snow-leopard" ]
5,200,617
1
5,200,785
null
12
2,664
I've figured out how to display the repeating part of a repeating decimal using OverBar. `repeatingDecimal` doesn't actually work as a repeating decimal. I'd like to make a variation of it that looks like a repeating decimal. --- ### Question How could I make a repeating decimal representation (possibly using `Interpretation[]`)? --- ### Background Please excuse me if I ramble. This is my first question and I wanted to be clear about what I have in mind. The following will "draw" a repeating decimal. ``` repeatingDecimal[q2_] := Module[{a}, a[{{nr__Integer}, pt_}] := StringJoin[ Map[ToString, If[pt > -1, Insert[{nr}, ".", pt + 1], Join[{"."}, Table["0", {Abs[pt]}], {nr}]]]]; (* repeating only *) a[{{{r__Integer}}, pt_}] := Row[{".", OverBar@StringJoin[Map[ToString, {r}]]}]; (* One or more non-repeating; more than one repeating digit KEEP IN THIS ORDER!! *) a[{{nr__, {r__}}, pt_}] := Row[{StringJoin[ Map[ToString, If[pt > -1, Insert[{nr}, ".", pt + 1], Join[{"."}, Table["0", {Abs[pt]}], {nr}]]]], OverBar@StringJoin[Map[ToString, {r}]]}]; (* One or more non-repeating; one repeating digit *) a[{{nr__, r_Integer}, pt_}] := Row[{StringJoin[Map[ToString, {nr}]], ".", OverBar@StringJoin[Map[ToString, r]]}]; a[RealDigits[q2]]] ``` So ``` repeatingDecimal[7/31] ``` a repeating decimal properly (shown here as a picture so that the OverBar appears). ![Repeating decimal displayed](https://i.stack.imgur.com/sQJik.png) Looking under the hood, it's really just an imposter, an image of a repeating decimal ... ``` In[]:= repeatingDecimal[7/31]//FullForm Out[]:= Row[List[".",OverBar["225806451612903"]]] ``` Of course, it doesn't behave like a number: ``` % + 24/31 ``` ![fraction plus repeating decimal](https://i.stack.imgur.com/fVznm.png) I'd like the addition to yield: 1 --- ### Edit: A cleaned up version of repeatingDecimal Leonid showed how to wrap Format around the routine and to supply up-values for adding and multiplying repeated decimals. Very helpful! It will take some time for me to be comfortable with up and down values. What follows below is essentially the streamlined version of the code suggested by Mr.Wizard. I set the OverBar above each repeating digit to allow line-breaking. (A single OverBar above Row looks tidier but cannot break when the right screen-margin is reached.) ``` ClearAll[repeatingDecimal] repeatingDecimal[n_Integer | n_Real] := n Format[repeatingDecimal[q_Rational]] := Row @ Flatten[ {IntegerPart@q, ".", RealDigits@FractionalPart@q} /. {{nr___Integer, r_List: {}}, pt_} :> {Table[0, {-pt}], nr, OverBar /@ r} ] repeatingDecimal[q_] + x_ ^:= q + x repeatingDecimal[q_] * x_ ^:= q * x repeatingDecimal[q_] ^ x_ ^:= q ^ x ``` The table below shows some output from `repeatingDecimal`: ``` n1 = 1; n2 = 15; ClearAll[i, k, r]; TableForm[Table[repeatingDecimal[i/j], {i, n1, n2}, {j, n1, n2}], TableHeadings -> {None, Table[("r")/k, {k, n1, n2}]}] ``` ![enter image description here](https://i.stack.imgur.com/3rPsO.png) --- ### Checking the solution: Operating with repeating decimals Let's now check the addition and multiplication of repeating decimals: ``` a = repeatingDecimal[7/31]; b = repeatingDecimal[24/31]; Print["a = ", a] Print["b = ", b] Print["a + b = ", a, " + ", b, " = ", a + b] Print["7/31 \[Times] 24/31 = " , (7/31)* (24/31)] Print["a\[Times]b = ", a*b, " = \n", repeatingDecimal[a*b]] Print[N[168/961, 465]] ``` ![repeating decimal addition and multiplication](https://i.stack.imgur.com/HzlTp.png) So addition and multiplication of repeating decimals work as desired. `Power` also appears to work properly. Notice that 168/961 occupies 465 places to the right of the decimal point. After that, it starts to repeat. The results match those of `N[168/961, 465]`, except for the `OverBar`, although line-breaks occur at different places. And, as is to be expected, this jibes with the following: ``` digits = RealDigits[168/961] Length[digits[[1, 1]]] ``` ![465 digits](https://i.stack.imgur.com/XKaB3.png) --- ### Some effects of the Format[] wrapper on the behavior of N[] in summing repeated decimals Mr.Wizard suggested that the wrapper is superfluous for the cases of Integers and Reals. Let's consider how the following two additions ``` repeatingDecimal[7/31] + repeatingDecimal[24/31] N@repeatingDecimal[7/31] + N@repeatingDecimal[24/31] ``` behave in four different cases: : Results when `Format` around repeatingDecimals for Reals and Integers and up values are ![Case 1](https://i.stack.imgur.com/kDebI.png) As expected, the first addition yields an integer, the second a decimal. --- : Results when `Format` around repeatingDecimals for Reals and Integers but up values are ![Case 2](https://i.stack.imgur.com/26dQX.png) The `Format` wrapper around Reals and Integers doesn't affect the additions at hand. --- : Results when `Format` around repeatingDecimals for Reals and Integers but up values are ![Case 3](https://i.stack.imgur.com/xHXBJ.png) If upvalues are OFF, `Format` prevents addition from happening. --- : Results when `Format` around repeatingDecimals for Reals and Integers and up values are ![Case 4](https://i.stack.imgur.com/D5z4d.png) If upvalues are OFF and Format` around repeatingDecimals for Reals and Integers , the second addition works as expected. All the more reason to remove the Format wrapper for the case of reals and integers. --- Anyone have any remarks about the different outcomes in Cases 3 and 4?
How can I make a "working" repeating decimal representation of a rational number?
CC BY-SA 3.0
0
2011-03-05T00:05:04.257
2012-12-07T20:14:29.500
2012-12-07T20:14:29.500
638,130
638,130
[ "math", "wolfram-mathematica", "decimal", "fractions", "decimal-point" ]
5,200,707
1
5,200,730
null
1
950
I'm looking for a Delphi OSD(on-screen display) component. I need to realize the karaoke caption effect, just like this pic: ![OSD](https://i.stack.imgur.com/Lx3fn.png)
Looking for a OSD component
CC BY-SA 2.5
0
2011-03-05T00:22:29.280
2011-03-05T02:10:25.533
null
null
130,075
[ "delphi" ]
5,200,708
1
5,201,484
null
0
645
![What it should look like](https://i.stack.imgur.com/CTEqX.gif) Hi I'm using JQuery tabs `http://jqueryui.com/demos/tabs/` with search results being returned from my server with each row potentially having its own tabs depending on the search results. If the user clicks on the sorting options then the search results change including the tabs within each row returned which may or may not have tabs. In the example above you can see there are 2 records returned and the top record has tabs called Other Videos. I have been successfully able to retrieve the resultset back from the server and the template is bulding correctly, however i cannot get the .tabs() function to fire? Does anyone have any experience with using tabs and know how I can get my tabs() function to fire? Here is the code I use to dynamically load the template after the json result set is returned: And here is a for loop that I use to iterate over the results after the template has been loaded with the new html tabs created to try and get the .tabs() function to fire: `for(var i=0;i<json.Data.SearchResults.Results.length;i++)` Suffice to say the alert box "it exists" appears successfully so it is finding the dynamically created html tab that the template generated however the tab itself is not being initialized by the statement: `$(document).find("div[id='tabs"+json.Data.SearchResults.Results[i].Counter+"']").tabs();` Does anybody know the reason why or what I'm missing here to get my .tabs() function to fire ... I've examined the dynamic content and double checked the html code using firebug inspector and everything is according to how it should be the id's are correct, the #id's are there and so on, so my only conclusion is that the .tabs() function is not firing. Is this a limitation on the JQuery tabs itself? Can it not perform this type of "live" loading capability? Is there a callback function I should be using as part of loading the template itself? Here is a picture of what is being returned after the call to the server without the tabs working: ![Tabs not working](https://i.stack.imgur.com/NjnzN.gif)
JQuery Tab function not firing via JQuery templates
CC BY-SA 2.5
null
2011-03-05T00:22:31.587
2011-03-05T03:36:39.427
2011-03-05T00:29:51.097
559,724
559,724
[ "jquery-ui-tabs" ]
5,200,741
1
5,200,746
null
4
727
this PHP RGB brightness altering function works partially: ![enter image description here](https://i.stack.imgur.com/afPbP.png) It misses one zero "0" at the end: so it should be "00" How to solve this? ``` $color = "#a7a709"; // constant $color1 = brightness($color,+25); // brighter, echoes #c0c022, correct RGB value $color2 = brightness($color,-25); // darker echoes #8e8e0, incorrect RGB value!! ``` How to fix this? Much appreciated! The function brightness(); ``` ### CREDITS go to Cusimar9 who wrote this function brightness($colourstr, $steps) { $colourstr = str_replace('#','',$colourstr); $rhex = substr($colourstr,0,2); $ghex = substr($colourstr,2,2); $bhex = substr($colourstr,4,2); $r = hexdec($rhex); $g = hexdec($ghex); $b = hexdec($bhex); $r = max(0,min(255,$r + $steps)); $g = max(0,min(255,$g + $steps)); $b = max(0,min(255,$b + $steps)); return '#'.dechex($r).dechex($g).dechex($b); } ```
"00" becomes "0" in PHP function, but it must be "00" for RGB to work. How?
CC BY-SA 3.0
0
2011-03-05T00:28:45.097
2012-12-24T00:42:25.920
2012-12-24T00:42:25.920
367,456
509,670
[ "php", "colors", "rgb", "zero" ]
5,200,796
1
5,200,930
null
5
181
I'm watching this lecture: [http://www.youtube.com/watch?v=Kq4FpMe6cRs](http://www.youtube.com/watch?v=Kq4FpMe6cRs) ![](https://i.stack.imgur.com/Ca1Aj.png) ``` // the speaker states that "'bar' is just some function // that invokes whatever function is passed to it" function bar(fn) { fn(); } function foo() { var x = 8; bar(function baz() { return x; }); } Object.prototype.x = 'foo'; ``` At minute 35, the above shown issue is presented. The lecturer states that some browsers will return `foo` instead of `8`. Why? Btw, while writing this question, I figured it out, but I'll post this question anyway because it's an interesting issue. `:)` --- [http://jsfiddle.net/simevidas/mHyKc/](http://jsfiddle.net/simevidas/mHyKc/) Opera 11 alerts `'foo'`, all my other browsers (including IE9) return `8`. --- I take back what I said about having figured this out. It has something to do with the nested function being a named function. If you remove the name (`baz`), then Opera returns `8`, which means that the issue only occurs with named nested functions. But why?
EcmaScript 5 Google TechTalk - Scoping accident 1 example
CC BY-SA 2.5
null
2011-03-05T00:38:27.087
2011-03-05T01:27:42.873
2011-03-05T01:27:42.873
592,746
425,275
[ "javascript", "prototype", "scope" ]
5,201,973
1
5,203,302
null
1
769
Ok, so I have an iPhone application that displays Word documents for certain terms and all. My problem is that the text seems to be "wrapped" or something else like that. This causes the words to not line up, which ultimately makes a lot of my Word documents contain incorrect information I am inserting the .doc files into a UIWebView which is set for "scale pages to fit". Also, when I zoom in it still stays the same way. This is happening in both the simulator and the actual iPhone. All help is appreciated! Below are two screenshots. This first one is of the iPhone app: ![Screenshot of iPhone](https://i.stack.imgur.com/BNxbe.png) This second one is of the Word document and how the text should really look: ![Screenshot of Word Document](https://i.stack.imgur.com/uKjVi.png)
UIWebView and Word Document Changes Formatting
CC BY-SA 2.5
null
2011-03-05T05:45:54.697
2011-03-05T10:47:03.863
null
null
556,935
[ "iphone", "uiwebview", "ms-word", "doc" ]
5,202,081
1
null
null
3
1,105
In the machine at the office my Visual Studio 2010 has the context menu to insert/remove row/colunm from a grid which is very convenient compared to manually insert - requires to update every each of the current row/column indexes. But at home, my IDE doesn't have this menu. I don't know how to have this context menu `Grid Row` and `Grid Column`. ![enter image description here](https://i.stack.imgur.com/Hzq9X.png) ## Update My VS version at home ![enter image description here](https://i.stack.imgur.com/jb1xJ.png) My VS version at office ![enter image description here](https://i.stack.imgur.com/o7GHh.png)
How to have insert/remove WPF grid row/column in context menu in design mode?
CC BY-SA 4.0
0
2011-03-05T06:12:58.740
2020-11-28T11:53:40.490
2020-11-28T11:53:40.490
472,495
248,616
[ "wpf", "visual-studio-2010", "grid", "contextmenu" ]
5,202,198
1
5,202,240
null
2
78
Here is the query which needs to be altered. I have attached the output of the screen. Here i need only the results where . How should i change in this query for the O/P. How can this be done? ``` SELECT d.id, d.dealTitle, d.expiryDate, d.dealMainImage, d.actualPrice, d.discount, d.offerValue, d.maxBuy, sum( sc.quantity ) AS totalDealsBought FROM deal AS d LEFT JOIN shoppingcart AS sc ON sc.dealID = d.id WHERE CURDATE( ) != d.startDate AND d.startDate < CURDATE( ) AND d.status = 'Active' AND d.cities = 'chennai' AND sc.paymentStatus = 'paid' GROUP BY d.id ``` ![enter image description here](https://i.stack.imgur.com/n1kaN.jpg) Thanks in advance.
mysql query needs to be altered
CC BY-SA 2.5
null
2011-03-05T06:43:47.777
2012-02-07T19:06:34.290
2011-03-07T11:39:33.263
154,137
154,137
[ "mysql" ]
5,202,221
1
5,202,274
null
1
416
I am using: ``` $.post('fromDB.php', function(data) { eval(data); console.log(data); updateTimer(); }); ``` to get some arrays from php. What php returns: ``` var todayTimeMinutes = [0, 45, 35, 25, 40, 0, 50, 40, 40, 30, 20]; var todayTimeHours = [0, 8, 9, 10, 10, 11, 11, 12, 13, 14, 15]; var todaySectionName = ["Before School", "Period 1", "Period 2", "Formtime", "Interval", "Period 3", "Period 4", "Lunchtime", "Period 5", "Period 6", "After School"]; console.log("Excecution time: 0.00058889389038086 seconds"); ``` The console.log works fine. When I try to access values from the array inside the success function, it works fine. However, accessing it from updateTimer() does not work, and gives me this message in the chrome debugger:![enter image description here](https://i.stack.imgur.com/lnb0D.png)
Getting an array from $.post()
CC BY-SA 2.5
null
2011-03-05T06:48:58.310
2011-03-05T07:05:14.787
null
null
492,025
[ "php", "javascript", "arrays", "debugging", "jquery" ]
5,202,315
1
null
null
6
3,878
i am trying to make a drawing application. i want to in android - like the way the Swype keyboard does it. And consequently i want to of the motion path into a data structure. How can i use the MotionEvent pointers to do this? ![enter image description here](https://i.stack.imgur.com/Wcdtm.jpg)
draw a single-touch motion path in android
CC BY-SA 2.5
0
2011-03-05T07:09:56.623
2011-03-05T08:19:38.543
null
null
636,762
[ "android", "path", "touch", "draw", "motion" ]
5,202,353
1
5,202,367
null
0
47
I need to write some text over google maps image. I try lot off combinations of colors but it is ugly. Can anybody give me a color ( hex value) which visible on that map and looks good ( I have no talent for design at all ) ? ![enter image description here](https://i.stack.imgur.com/22ziH.png)
Need color value visible over map
CC BY-SA 2.5
null
2011-03-05T07:18:01.130
2011-03-05T07:23:15.937
null
null
486,578
[ "colors", "gui-design" ]
5,202,468
1
5,202,517
null
1
2,569
I want to use webdings characters in .net application. Does anyone know how to do this. I tried using : ``` <asp:Label ID="lblSample" runat="server" Font-Names="Webdings" ></asp:Label> ``` ``` lblSample.Text = "0x61" ``` But it doesn't displaying properly. ![enter image description here](https://i.stack.imgur.com/ZslUl.png)
How to use webdings character map in asp.net
CC BY-SA 2.5
null
2011-03-05T07:49:04.717
2011-03-05T08:01:53.983
null
null
503,125
[ "asp.net" ]
5,202,748
1
6,499,997
null
7
10,002
Consider this preferences.xml file: ``` <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/preference_main"> <PreferenceScreen android:title="@string/preference_sight" android:key="category_sight"> <ListPreference android:summary="@string/preference_sight_wb_msg" android:title="@string/preference_sight_wb_title" android:key="sight_wb" android:defaultValue="auto"/> <Preference android:key="sight_wb_values_cache"/> <eu.elevelcbt.sm.preferences.PercentBarPreference android:title="@string/preference_sight_mean_confidence_min_title" android:summary="@string/preference_sight_mean_confidence_min_msg" android:key="sight_mean_confidence_min" android:defaultValue="80"/> <CheckBoxPreference android:key="sight_flash" android:defaultValue="false" android:summary="@string/preference_sight_flash_msg" android:title="@string/preference_sight_flash_title"/> </PreferenceScreen> </PreferenceScreen> ``` When shown in my MainPreference class extending PreferenceActivity is correctly shows me a first level menu with one entry "Sight" (@string/preference_main) which, when selected, takes me to the second preference screen where I have all my preferences. Everything works as I wanted. The only thing is the on first preference screen I want to put an icon beside the label "Sight" like in main Android setting menu. How can I do that? Thank you very much in advance for any help! Luca. Mine: ![Mine](https://i.stack.imgur.com/WrOyL.png) Desired: ![Desired](https://i.stack.imgur.com/zwBni.png) --- ...mmm I tried but no luck... ``` <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/preference_main"> <PreferenceScreen android:title="@string/preference_sight" android:key="category_sight" android:icon="@drawable/ic_dialog_light"> ... </PreferenceScreen> ``` where am I doing wrong?
How to add icons to PreferenceScreen entries
CC BY-SA 3.0
0
2011-03-05T08:57:13.690
2020-09-29T20:20:54.567
2012-08-21T11:35:13.780
50,776
645,854
[ "android", "android-widget" ]
5,202,801
1
null
null
0
647
I have ToolStripContainer I need to add the child to be his element. Just can drag and drop as usual ToolStripItems Element is simply a ListBox. ![enter image description here](https://i.stack.imgur.com/XC7HR.jpg) .net framework 2.0
How to create a ToolStripItem?
CC BY-SA 2.5
null
2011-03-05T09:10:14.467
2011-03-09T05:01:23.020
null
null
450,466
[ "c#", "winforms", ".net" ]
5,203,241
1
8,661,485
null
15
11,713
For the below array i get a smooth curve. ``` data.addColumn('string', 'x'); data.addColumn('number', 'Cats'); data.addColumn('number', 'Blanket 1'); data.addColumn('number', 'Blanket 2'); data.addRow(["A", 1, 1, 0.5]); data.addRow(["B", 2, 0.5, 1]); data.addRow(["C", 4, 1, 0.5]); data.addRow(["D", 8, 7 , 1]); data.addRow(["E", 7, 1, 0.5]); data.addRow(["F", 7, 0.5, 1]); data.addRow(["G", 8, 1, 0.5]); data.addRow(["H", 4, 0.5, 1]); data.addRow(["I", 2, 1, 0.5]); data.addRow(["J", 3.5, 0.5, 1]); data.addRow(["K", 3, 1, 0.5]); data.addRow(["L", 3.5, 0.5, 1]); data.addRow(["M", 1, 1, 0.5]); data.addRow(["N", 1, 0.5, 1]); ``` ![enter image description here](https://i.stack.imgur.com/ifsHw.jpg) Now assume that I don't have the Blanket1 value for row D, how do I represent it so that there is coninuity in the graph? If I make it like `data.addRow(["D", 8, , 1]);` the graph becomes discontinuous at the D for Blankets. ![enter image description here](https://i.stack.imgur.com/7ItkO.jpg) I want google to make a guess at that value and keep the curve smooth. Even if the guess is not smart that is fine but the curve should be continuous and smooth.
Representing "No value" in array in Google visualization
CC BY-SA 2.5
0
2011-03-05T10:32:39.627
2011-12-28T23:26:59.240
null
null
493,742
[ "charts", "visualization", "linegraph" ]
5,203,385
1
5,227,638
null
2
1,130
I need to draw a diagonal line so we can demonstrate a middle line for the progress of something which may not necessarily to go (0,0), (1,1)....(4, 4), it may deviate according to the ratio between X and Y Axes. After I agreed to draw the line as a `LineSeries`, I have this problem of duplicating axes. I need to draw 3 line series. Amount -> The visits amount. Target -> The monthly target (this is a X-axis parallel line). Midline -> The middle line of a normal progress of visits. the Amount series could include days from day 1 to day 10, but the Midline series always have to demonstrate all month days (for March it is from 1 to 31). So, now (other than the target) , and (top and bottom), I want both series to take the same bottom X axis (from day 1 to day 31) and when the day 10 comes the Amount series line will stop being drawn but the Midline will continue till day 31. Here is a Pic of what I want: ![Middle line series](https://i.stack.imgur.com/LpctO.png) See the black line? this is what I want to be the middle line, but instead till now the gray line is what I was able to do. I only have 4 data points, if they were really 31 data points the mid line will be drawn correctly, but I want to draw it correctly regardless of the data points count. for simplicity purposes the duplicate upper X axis is not shown in this example because I gave the similar data to both series-es but if I assigned the whole month data to the middle line it will create an upper 1-31 days X axis.
Drawing diagonal line within Silverlight Chart
CC BY-SA 2.5
null
2011-03-05T11:04:11.830
2011-03-08T02:26:58.270
2011-03-06T12:40:15.117
502,436
502,436
[ "silverlight", "charts" ]
5,203,871
1
5,204,178
null
2
686
For one of my projects thats kind of a content-aggregator i'd like to introduce concurrency and if possible parallelism. At first hand this may seem pointless because concurrency and parallelism take different approaches. (Concurrency via threads introduces immediate concurrency, where as parallelism provides a potential). So to better explain my problem, let me summarize my problem set. As my project is a content-aggregator (that aggregates feeds,podcasts and similar stuff) it basically reads the data from web, parses them to return the meaningful data. So as of right now i took a very simplistic sequential approach. Let's say that we've some amount of feeds we have to parse. ``` foreach(feed in feeds) { read_from_web(feed) parse(feed) } ``` So with sequential approach time taken parse all feeds and process them greatly depends on not only the parser code but time needed to get the xml source from web. We all know that it may take variable time to get read the source from web (because of the network conditions and similar issues). So to speed up the code i can take an approach of worker threads which will introduce an immediate concurrency; ![concurrency](https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Thread_pool.svg/400px-Thread_pool.svg.png) So a defined number of worker threads can take a feed & parse concurrently (which will for sure speed up the whole the process - as we'll see lesser impact of waiting for data over the net). This is all okay until the point that, my target audience of the project mostly runs multi-core cpus -- because of the fact that they're gamers --. I want to also utilize these cores while processing the content so started reading on the potential parallelism [http://oreilly.com/catalog/0790145310262](http://oreilly.com/catalog/0790145310262). I've still not finished reading it yet and don't know if this is already discusses but i'm quite a bit obsessed with this and wanted to ask over stackoverflow to get an overall idea. So as the book describes potential parallelism: Potential Parallelism means that your program is written so that it when and roughly as an equivalent sequential program . So the real question is, while i'm using worker threads for concurrency, can i still use possible parallelism? (running my feed parsers on worker threads and still distributing them to cpu cores -- if the cpu supports multi-cores of course)
Is it possible to use thread-concurrency and parallelism together?
CC BY-SA 3.0
0
2011-03-05T12:42:01.563
2011-07-18T20:08:11.227
2017-02-08T14:31:42.047
-1
170,181
[ "c#", "multithreading", "concurrency", "parallel-processing" ]
5,203,964
1
5,204,541
null
0
459
I have an iPhone application that's using Navigation Controller to display the top bar (with title and back button, and such...). I added a `UITabBar` to the application window, that enables to switch between the parts of it. Instead of adding the tab bar to each of ViewController's view I added the bar to app window. (When I had it in the ViewController, switching between controllers made the tab bar to swipe left/right, when animated pop/push occured, together with whole view). So, I added the `UITabBar` to the `MainWindow.xib`, and tied it to the app delegate's variable. In my `didFinishLaunchingWithOptions` method, I added the following code: ``` [self.window addSubview:navigationController.view]; CGRect frame = navigationController.view.frame; frame.size.height -= tabbar.frame.size.height; navigationController.view.frame = frame; tabbar.selectedItem = [tabbar.items objectAtIndex:0]; ``` to resize the main (`navigationController`'s) view, in order to make the TabBar visible. The problem shows up when I rotate the device -- my view gets stretched to full window and I loose the ability to show the TabBar. I added a `- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation) fromInterfaceOrientation` method to my ViewController, with the following code: ``` - (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { CGRect frame = self.view.frame; frame.size.height -= [AppState shared].tabBar.frame.size.height; //frame.origin.y = [AppState shared].tabBar.frame.size.height; //frame.origin.x = 100; self.view.frame = frame; frame = [AppState shared].tabBar.frame; frame.origin.y = [UIScreen mainScreen].bounds.size.height - frame.origin.y - frame.size.height; [AppState shared].tabBar.frame = frame; } ``` It resizes the view, and moves the tab bar to up/down part of the view (I allow only Portrait/Portrait upside down orientations here). The problem is, my TabBar is turned upside down as well, and also, it's no longer clickable. It looks like the image below: ![Tab bar upside down](https://i.stack.imgur.com/YeFdn.png) Anyone knows how to handle this kind of situation? Or, how to make the tab bar not tied to view controller, but also able to handle interface's rotation smoothly?
iPhone's UITabBar as part of application window; problems when rotating device
CC BY-SA 2.5
null
2011-03-05T13:02:16.963
2011-03-05T14:54:08.643
null
null
4,172
[ "iphone", "cocoa-touch", "uinavigationcontroller", "uitabbar", "device-orientation" ]
5,204,047
1
5,412,296
null
2
4,746
I'm using jquery ui's sortable function with several connected lists. These lists is contained inside draggable, resizeable divs with an "overflow: auto" on the divs. The problem I have comes to when I place one div with alot of list-items(‹li›) above another. ![enter image description here](https://i.stack.imgur.com/tf6F6.jpg) Top div contains a lot of li elements which means it actually extends far below than actually shown. This means when I move one of the elements in the bottom div the element will jump between the top div's sortable list(which shouldn't happen, because its hidden) and the bottom div's sortable list making it flicker between the two. This is a major issue because it's hard for the user to drop the li in the right div if this is how he/she placed their divs. What I want is the li only to connect with the list which div it's currently hovering over. Anyone know how to fix this? ### Technical details The bottom div as example: ``` <div style="height: 310px; width: 200px; z-index: 14; left: 909px; top: 215px; position: absolute;" class="Category ui-draggable ui-resizable p-resize-snap" id="cat883"> <input type="hidden" value="310" id="hiddenHeight883" name="ctl00$MainContentPlaceHolder$hiddenHeight883"><div style="height: 20px;" class="CategoryHeader"> <table style="table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><a onclick="return ToggleLinks(&quot;883&quot;);" href="#">^</a></td><td class="categoryNameTD"><span class="categoryName">Games </span><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbxCat883" id="cbxCat883"></span></td><td style="width: 16px;"><a onclick="return Edit();" href="#">E</a></td> </tr> </tbody></table> </div><div style="height: 274px; overflow: auto; border-bottom: 1px dotted rgb(221, 221, 221);" id="catLinks883"> <div class="CategoryLinks"> <ul style="list-style-type: none; margin: 0px; padding: 0px;" class="drpList ui-sortable"><li style=""><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://www.youtube.com/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://www.youtube.com/" title="Youtube">Youtube</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx722" id="cbx722"></span></td> </tr> </tbody></table> </div></li><li style=""><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://www.metacritic.com/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://www.metacritic.com/" title="Metacritic - Movie Reviews, TV Reviews, Game Re...">Metacritic - Movie Reviews, TV Reviews, Game Re...</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx710" id="cbx710"></span></td> </tr> </tbody></table> </div></li><li style="display: list-item;"><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://www.myspace.com/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://www.myspace.com/" title="MySpace">MySpace</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx725" id="cbx725"></span></td> </tr> </tbody></table> </div></li><li style=""><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://www.fz.se/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://www.fz.se/" title="FZ">FZ</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx707" id="cbx707"></span></td> </tr> </tbody></table> </div></li><li style=""><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://n4g.com/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://n4g.com/" title="N4G.com : All the latest game news">N4G.com : All the latest game news</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx708" id="cbx708"></span></td> </tr> </tbody></table> </div></li><li style=""><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://www.facebook.com/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://www.facebook.com/" title="Facebook">Facebook</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx724" id="cbx724"></span></td> </tr> </tbody></table> </div></li><li style=""><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://www.quakelive.com/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://www.quakelive.com/" title="QUAKE LIVE">QUAKE LIVE</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx713" id="cbx713"></span></td> </tr> </tbody></table> </div></li><li style=""><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://lifehacker.com/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://lifehacker.com/" title="Lifehacker, tips and downloads for getting thin...">Lifehacker, tips and downloads for getting thin...</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx721" id="cbx721"></span></td> </tr> </tbody></table> </div></li><li style=""><div class="drpLink"> <table style="width: 100%; table-layout: fixed;"> <tbody><tr> <td style="width: 16px;"><img style="height: 16px; width: 16px;" alt="@" src="http://quicksilverscreen.com/favicon.ico"></td><td style="overflow: hidden; white-space: nowrap;"><a target="_blank" href="http://quicksilverscreen.com/" title="http://quicksilverscreen.com/">http://quicksilverscreen.com/</a></td><td style="width: 16px;"><span style="display: none;"><input type="checkbox" name="ctl00$MainContentPlaceHolder$cbx723" id="cbx723"></span></td> </tr> </tbody></table> </div></li></ul> </div> </div> <div class="ui-resizable-handle ui-resizable-e"></div><div class="ui-resizable-handle ui-resizable-s"></div><div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 1001;"></div></div> ``` ### Update: Initialization: I've already tried using helper: 'clone', appendTo: "several different elements including body" and zIndex: 10000 but none of them helps me. What I would like the appendTo attribute to achieve is making the li droppable inside the (visual part of) my ".Category" i.e. the div that contains the list. ``` $(".drpList").sortable({ handle: ".drpLink img", connectWith: ".drpList", tolerance: "pointer" }); ```
jquery-ui sortable "overlapping" issue
CC BY-SA 2.5
null
2011-03-05T13:21:50.217
2011-03-23T22:13:42.027
2011-03-05T17:00:40.777
391,307
391,307
[ "jquery", "html", "jquery-ui" ]
5,204,447
1
5,205,079
null
1
789
I'm trying to emulate the color tint effect from the `UITabBarItem`. When I draw a linear gradient at an angle, I get visible aliasing in the middle part of the gradient where the two colors meet at the same location. Left is `UITabBarItem`, right is my gradient with visible aliasing (stepping): ![gradient aliasing](https://i.stack.imgur.com/SrnnT.png) Here is the snippet of relevant code: ``` UIGraphicsBeginImageContextWithOptions(size, NO, 0.0); CGContextRef c = UIGraphicsGetCurrentContext(); CGContextSaveGState(c); CGContextScaleCTM(c, 1.0, -1.0); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGFloat components[16] = {1,1,1,1, 109.0/255.0,175.0/255.0,246.0/255.0,1, 31.0/255.0,133.0/255.0,242.0/255.0,1, 143.0/255.0,194.0/255.0,248.0/255.0,1}; CGFloat locations[4] = {0.0, 0.62, 0.62, 1}; CGGradientRef colorGradient = CGGradientCreateWithColorComponents(colorSpace, components, locations, (size_t)4); CGContextDrawLinearGradient(c, colorGradient, CGPointZero, CGPointMake(size.width*1.0/3.9, -size.height),0); CGGradientRelease(colorGradient); CGColorSpaceRelease(colorSpace); CGContextRestoreGState(c); UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return resultImage; ``` What do I need to change, to get a smooth angled gradient like in UITabBarItem?
Linear gradient aliasing with CoreGraphics
CC BY-SA 2.5
null
2011-03-05T14:38:11.983
2011-05-02T07:32:36.723
null
null
41,307
[ "core-graphics" ]
5,204,862
1
5,204,926
null
0
956
my C++ program reads a file with sql query and tries to execute it. When I execute the query using phpmyadmin, it works, but when executed in my program, it ends up with the following error: ![SQL Syntax error](https://i.stack.imgur.com/6g9hH.png) Code: ``` ifstream create_file ("create.sql"); if (create_file.is_open()) { char * create; int length; create_file.seekg (0, ios::end); length = create_file.tellg(); create_file.seekg (0, ios::beg); create = new char [length]; create_file.read (create,length); create_file.close(); cout << "Executing query: " << endl; cout.write (create,length); cout << "EOF query" << endl; if(mysql_query(mysql, "CREATE DATABASE grant_db")) { fprintf(stderr, "Failed to create database: Error: %s\n", mysql_error(mysql)); } if(mysql_select_db(mysql, "grant_db")) { fprintf(stderr, "Failed to select database: Error: %s\n", mysql_error(mysql)); } if(mysql_query(mysql, create)) { fprintf(stderr, "Failed to create table: Error: %s\n", mysql_error(mysql)); mysql_query(mysql, "DROP DATABASE grant_db"); } delete[] create; } else cout << "Unable to open file 'create.sql'."; ``` Thanks for your help!
C++ MySQL Sql syntax error while syntax is correct
CC BY-SA 2.5
null
2011-03-05T15:49:29.780
2011-03-05T16:05:24.823
null
null
null
[ "c++", "mysql", "file-io" ]
5,205,244
1
5,205,319
null
11
6,137
I am developing a taskbar for the 2nd screen(something like displayfusion). However, I'm having difficulty at getting the right average color from the icon. For example Google Chrome/ When I hover it on the main taskbar it backgrounds turns yellow. With my code it turns orange/red. This is what it looks now: ![enter image description here](https://i.stack.imgur.com/ZxCzW.png) How can I get the right dominant/average color? I use this code to calculate the average color: ``` public static Color getDominantColor(Bitmap bmp) { //Used for tally int r = 0; int g = 0; int b = 0; int total = 0; for (int x = 0; x < bmp.Width; x++) { for (int y = 0; y < bmp.Height; y++) { Color clr = bmp.GetPixel(x, y); r += clr.R; g += clr.G; b += clr.B; total++; } } //Calculate average r /= total; g /= total; b /= total; return Color.FromArgb(r, g, b); } ```
get average color from bmp
CC BY-SA 2.5
0
2011-03-05T16:57:42.710
2011-05-25T02:20:59.350
2011-03-05T17:06:36.437
23,199
426,160
[ "c#", "rgb" ]
5,205,280
1
5,207,377
null
27
27,413
I am developing an app with Entity Framework 4 and SQL Compact 4, using a Model First approach. I have created my EDM, and now I want to generate a SQL Compact 4.0 database to act as a data store for the model. I bring up the and click the button to create a connection for the generated file. The dialog appears, but SQL Compact 4.0 is not listed in the list of available data sources: ![enter image description here](https://i.stack.imgur.com/LIQ0C.png) I am running VS 2010 SP1 (beta) and I have installed the VS 2010 Tools for SQL Compact 4.0. I can create a SQL Compact 4.0 data connection from the Server Explorer. It is only in the that the 4.0 option doesn't appear. BTW, my SQL Compact 4.0 installation does include `System.Data.SqlServerCe.Entity.dll`. So I should have the SQL Compact components I need. Am I doing something incorrectly, or is this a bug? Does anyone have a fix or a workaround? Thanks for your help.
Entity Framework 4 and SQL Compact 4: How to generate database?
CC BY-SA 2.5
0
2011-03-05T17:02:31.590
2012-09-12T23:06:47.023
2011-03-05T20:10:02.937
93,781
93,781
[ "entity-framework", "entity-framework-4", "sql-server-ce" ]
5,205,759
1
null
null
0
2,297
The background I'm trying to draw for my app seems to be getting scaled too large for some reason. I made sure the emulator is WVGA800, have it set up in the manifest and layout to be full screen and landscape (just like the image which is 800 x 480). I just don't see where it would scale the image. Here's a picture of the problem. The image when put in the emulator, and then the actual image. ![http://i.stack.imgur.com/iRIFk.jpg](https://i.stack.imgur.com/kYCIg.jpg) Here's some relavant code: ``` /* mBackground instantiated in the class constructor */ mBackground = BitmapFactory.decodeResource( mContext.getResources(), R.drawable.background ); private void doDraw( Canvas canvas ) { canvas.drawBitmap( mBackground, 0, 0, null ); } ``` Here's the layout ``` <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"> <com.project.game.GameView android:id="@+id/game" android:layout_width="match_parent" android:layout_height="match_parent"/> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> </RelativeLayout> </FrameLayout> ```
My background image is being drawn too big for the canvas
CC BY-SA 2.5
null
2011-03-05T18:14:14.280
2016-02-09T07:16:15.727
2011-03-05T18:21:53.640
110,233
110,233
[ "java", "android", "image", "layout", "drawing" ]
5,205,926
1
5,206,036
null
1
1,482
i'm a beginner at CSS and trying to do a [NETTUTS](http://net.tutsplus.com/tutorials/site-builds/convert-a-warm-cheerful-web-design-to-html-and-css/) , but there's a portion in the webpage that i don't know what exactly to do in CSS to make it look right ... ![enter image description here](https://i.stack.imgur.com/17NOz.jpg) I just can't get this input text boxes, textarea and the button to be aligned like that , and to be honest the tutor isn't doing a great job to clearing stuff out Using alternative and absolute positioning, and setting top and right spacing is kinda no a good idea i think ... I'm trying to align them using FlexBox feature but don't know why those elements are not moving at all ... Here's my HTML & CSS3 code (for chrome) : ``` <section id="getAfreeQuote"> <h2>GET A FREE QUOTE</h2> <form method="post" action="#"> <input type="text" name="yourName" placeholder="YOUR NAME"/> <input type="email" name="yourEmail" placeholder="YOUR EMAIL"/> <textarea name="projectDetails" placeholder="YOUR PROJECT DETAILS."></textarea> <input type="text" name="timeScale" placeholder="YOUR TIMESCALE"/> <button>Submit</button> </form> ``` ``` #getAfreeQuote form { display:-webkit-box; -webkit-box-orient:vertical; height:500px; } #getAfreeQuote input[name="yourName"]{ -webkit-box-ordinal-group:1; } #getAfreeQuote input[name="yourEmail"]{ -webkit-box-ordinal-group:1; } #getAfreeQuote textarea{ -webkit-box-ordinal-group:2; } #getAfreeQuote input[name="timeScale"]{ -webkit-box-ordinal-group:3; } #getAfreeQuote button { -webkit-box-ordinal-group:4; } ``` and the result : ![enter image description here](https://i.stack.imgur.com/BJQ0m.jpg)
How to style this form using CSS?
CC BY-SA 2.5
0
2011-03-05T18:37:15.857
2012-04-09T18:10:42.080
2012-04-09T18:10:42.080
106,224
195,582
[ "html", "css" ]
5,206,009
1
5,207,976
null
2
1,357
What HBM do I have to write for `Blog` and `Post` to have a bidirectional relationship between these tables? I tried `many-to-one` from both sides but run into the following problems (most likely because I did it totally wrong): - `Session`- `Blog``Post` : My example is contrived, please don't argue the design. ![Design](https://i.stack.imgur.com/oL1KX.png) ``` public class Blog { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual Comment LastComment { get; set; } // last-comment public virtual IList<Post> Posts { get; set; } } public class Post { public virtual int Id { get; set; } public virtual string Content { get; set; } public virtual IList<Comment> Comments { get; set; } } public class Comment { public virtual int Id { get; set; } public virtual string Feedback { get; set; } public virtual Blog Blog { get; set; } //commented-on } ``` ``` <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Sample" namespace="Sample"> <class name="Blog"> <id name="Id"> <generator class="hilo" /> </id> <property name="Name" /> <!-- How to map Comment? --> <bag name="Posts"> <key column="BlogId" /> <one-to-many class="Post" /> </bag> </class> <class name="Post"> <id name="Id"> <generator class="hilo" /> </id> <property name="Feedback" /> <bag name="Comments"> <key column="PostId" /> <one-to-many class="Comment" /> </bag> </class> <class name="Comment"> <id name="Id"> <generator class="hilo" /> </id> <property name="Comment" /> <!-- How to map back to Blog? --> </class> </hibernate-mapping> ``` ``` +------------------------------+ | Blog | +--------------+---------------+ | Id | int | | Name | nvarchar(50) | | LastCommentId| int (null) | +--------------+---------------+ +------------------------------+ | Post | +--------------+---------------+ | Id | int | | BlogId | int | +--------------+---------------+ +------------------------------+ | Comment | +--------------+---------------+ | Id | int | | PostId | int | | BlogId | int (not-null)| | Feedback | nvarchar(200) | +--------------+---------------+ ```
NHibernate many-to-one and bidirectional access
CC BY-SA 2.5
0
2011-03-05T18:49:14.447
2011-03-07T10:02:55.993
2011-03-07T10:02:55.993
11,123
11,123
[ ".net", "nhibernate", "nhibernate-mapping", "many-to-one" ]
5,206,069
1
5,206,158
null
0
246
I am doing some assembly homework and thought the best way to get my head around what is going on is to watch what happens in the registers as the program runs. In Visual Studio You can view the registers but I am doing an operation that only changes things in the lower 8-bits of one of my registers so im not sure what I should be looking at. Can anyone help me out? Here's the question and the code I'm running: ``` TITLE MASM Template (main.asm) INCLUDE Irvine32.inc .data var1 SBYTE -4, -2, 3, 1 .code main PROC call Clrscr mov al, var1 mov ah, [var1+3] exit main ENDP END main ``` Im pretty sure the answer is -4 after the first statement and 1 after the second statement but I want to see it in the registers. and the register window i have to look as in VS: ![enter image description here](https://i.stack.imgur.com/jbMam.png)
How can I view what is happening in the lower parts of the EAX register in VS2008?
CC BY-SA 2.5
null
2011-03-05T18:59:39.053
2015-12-26T11:07:45.323
2015-12-26T11:07:45.323
3,512,216
538,293
[ "visual-studio", "assembly", "masm", "irvine32" ]
5,206,139
1
null
null
1
1,173
i have 2 tables assignment and feedback, in a gridview it displays all the assignments, the assignments then get feedback. im then wanting to change the view feedback button in the gridview depending on if there is new feedback for example: ![enter image description here](https://i.stack.imgur.com/ocyZY.jpg) ![enter image description here](https://i.stack.imgur.com/zLwRp.jpg) the feedback table has a state field in it so when its 1 i want that image button to change to the one with the + Thanks in advance Houlahan
change an individual image in a gridview depending on a value
CC BY-SA 2.5
0
2011-03-05T19:11:16.583
2011-03-05T19:21:08.107
2011-03-05T19:20:36.223
512,623
512,623
[ "asp.net", "vb.net", "gridview" ]
5,206,230
1
5,207,130
null
0
1,089
If the ItemSource property of a combo box has been set, why could clicking on the drop down botton of a combobox not display the list of available items? This may be related but within the same control, any context menu is displayed behind the user control: The XAML for this control is as follows: ``` <Border Name="Border" Padding="5"> <ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer.Resources> <Style TargetType="{x:Type CheckBox}"> <Setter Property="Padding" Value="8,0,0,0"/> <Setter Property="VerticalAlignment" Value="Center"/> </Style> </ScrollViewer.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid Margin="5,4,0,4" > <Grid.ColumnDefinitions> <ColumnDefinition Width="20" /> <ColumnDefinition SharedSizeGroup="labelColumn1" /> <ColumnDefinition SharedSizeGroup="labelColumn2" /> <ColumnDefinition SharedSizeGroup="dataEntryColumn" /> <ColumnDefinition Width="30"/> <ColumnDefinition SharedSizeGroup="labelColumn2"/> <ColumnDefinition SharedSizeGroup="dataEntryColumn" /> <ColumnDefinition MaxWidth="0" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition MinHeight="23" /> <RowDefinition MinHeight="23" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <TextBlock Text="Geometry Type" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"/> <ComboBox Grid.Column="3" Margin="6,1,0,1" Grid.Row="0" Width="150" Name="cmboGeometryTypes" SelectedItem="{Binding GeometryType, Mode=TwoWay}" HorizontalAlignment="Left" DisplayMemberPath="Name" Grid.ColumnSpan="1" /> <TextBlock Text="Symbol Type" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center"/> <ComboBox Name="cmboSymbolEditors" SelectedItem="{Binding SymbolEditorViewModel, Mode=TwoWay}" HorizontalAlignment="Left" DisplayMemberPath="Alias" Width="150" Grid.Column="3" Margin="6,1,0,1" Grid.Row="1" Grid.ColumnSpan="1" /> </Grid> <Label Padding="10,0,0,0" Margin="10,0,0,3" Style="{StaticResource fadingLabelSeperatorStlye}" Grid.Row="1"> Editor </Label> <local:SymbologyEditorControl x:Name="editor" Grid.Row="2"/> </Grid> </ScrollViewer> </Border> ``` and the effect I am observing is illustrated below![enter image description here](https://i.stack.imgur.com/69eec.png) How do I fix this?
WPF combobox items list/context menu rendered behind parent
CC BY-SA 2.5
null
2011-03-05T19:28:59.920
2015-06-11T18:31:38.073
2015-06-11T18:31:38.073
4,370,109
187,279
[ "wpf", "combobox", "contextmenu" ]
5,206,376
1
5,207,754
null
14
3,394
Does anyone know how to make jQuery masonry stack from the bottom up? I wrote some rudimentary JS to stack things from bottom up but it couldn't do masonryish stuff like stacking the next brick on the shortest column and bricks that span multiple columns. Since I'm not good with Math, looking at the source code just makes me dizzy. ![Stacking from bottom up](https://i.stack.imgur.com/dO4L3.png) Anyone want to try?
jQuery Masonry from bottom up
CC BY-SA 2.5
0
2011-03-05T19:52:46.490
2011-03-06T00:39:39.070
null
null
519,632
[ "javascript", "jquery", "css", "positioning", "jquery-masonry" ]
5,206,409
1
null
null
-1
9,044
I don't know how to position an image with CSS on the right side of the website. I need absolute values from the center of the page and from the top. I can't use absolute value from left or right, because I want the banner to be always next to the right side of the main content (also when the browser is resized). The main content is in the center of the page. Since the image sizes can change, it should always be at the same distance from the page content. How to do that? Thanks, Ivan EDIT: This is a dummy sketch how I imagined it. ![enter image description here](https://i.stack.imgur.com/357a6.png)
Positioning a banner on the right side of a site
CC BY-SA 2.5
0
2011-03-05T19:57:15.237
2022-08-12T23:02:55.393
2011-03-05T20:31:25.873
522,394
522,394
[ "html", "css" ]
5,206,458
1
5,207,875
null
3
1,411
When using a wpf textbox without explicit height and width values, and when there is space available to expand, the textbox resizes as you type. However when I change the border thickness, it does not recalculate it and for very thick borders, part of the text is covered by the border. How do I explicitly precipitate a recalc? Coincidently I am using a derived custom textbox class so I should know when the border thickness changes. ![enter image description here](https://i.stack.imgur.com/xqJhu.png)
WPF TextBox recalculate size
CC BY-SA 2.5
0
2011-03-05T20:07:08.293
2011-03-06T00:44:04.410
2011-03-05T20:18:01.850
190,615
190,615
[ "wpf", "wpf-controls" ]
5,206,498
1
5,206,538
null
1
343
## What is happening I am running into a problem. I have a menu like this: ``` <div id='feeds'> <div class='feed'>Super Dense</div> <div class='feed'>Everything</div> <div class='feed current-feed'>Smashing Magazine Feed</div> <div class='feed'>Hot Questions - Stack Exchange</div> </div> ``` I style this with CSS (I only show the border and background properties here): ``` .feed { background: -webkit-gradient(linear, left top, left bottom, from(#DDD), to(#CCC)); border-bottom: solid 1px #AAA; border-left: solid 1px #AAA; border-right: solid 1px #AAA; } .feed:first-child { border-top: solid 1px #AAA; } .feed.current-feed, .feed:active { background: -webkit-gradient(linear, left top, left bottom, from(#333), to(#444)); border-bottom: solid 1px #000; border-left: solid 1px #000; border-right: solid 1px #000; } .feed.current-feed:first-child, .feed:active:first-child { border-top: solid 1px #000; } ``` This is the result ([view on jsFiddle](http://jsfiddle.net/TmXxv/) WebKit only): ![screenshot 1](https://i.stack.imgur.com/EpFlc.png) ## The Problem This might look nice, but there is a little problem. There is a #AAA line above a black box, and this does not look nice (pixel perfection): ![screenshot 2](https://i.stack.imgur.com/gkX94.png) ## My Question Is there a way in CSS to check if the next element is of a certain class, so I can set `border-bottom` to `solid 1px #000`, or is there another way to solve my problem? My web app heavily uses JavaScript, so if this is required, it's not a problem, but CSS is cleaner in my opinion.
Set border-bottom to another color if the next item is of a specific class
CC BY-SA 2.5
null
2011-03-05T20:12:14.057
2011-03-05T20:37:02.190
2011-03-05T20:37:02.190
null
null
[ "html", "css", "colors", "border" ]
5,206,575
1
5,213,693
null
15
13,325
I have a very simple application where I am trying to use the gyroscope thru core motion. At this point, for test purposes, I am just grabbing the values of roll, pitch and yaw and printing on screen. According to the picture below and as far as I know, roll, pitch and yaw correspond to the red, green and blue axis, right? OK. When I put the iphone on a table resting on its left side (home button on the right), perfectly at 90 degrees in relation to the table plane, these are the values I read for roll, pitch and yaw: -90, 0, 0. Then I start to rotate the iPhone according to the table's vertical axis in an anti-clockwise fashion, that would be on the positive direction according to the table vertical axis. On the iPhone, that would mean a pitch rotation, but as I rotate, pitch remains constant and YAW is the one that changes!!!!! If the iPhone is resting on its left side on the table, the green axis (pitch) is vertical. If I am rotating the device anti-clockwise (positive) on X, I should see an increase on the pitch angle, not yaw. The only explanation I have for this is, the gyroscope axis don't rotate when you rotate the device. So, if I am using the default attitude reference, the iPhone considers that the face up resting position is the default and the blue axis (yaw) will always be the vertical one. Is this correct? This is the code I am using... on the main code ``` motionManager = [[CMMotionManager alloc] init]; motionManager.deviceMotionUpdateInterval = 1.0/60.0; //60 Hz [motionManager startDeviceMotionUpdates]; timer = [[NSTimer scheduledTimerWithTimeInterval:(1.0/60.0) target:self selector:@selector( readIt ) userInfo:nil repeats:YES] retain]; ``` the remaining code ``` #define degrees(x) (180.0 * x / M_PI) - (void) readIt { // CMAttitude *referenceAttitude; CMAttitude *attitude; CMDeviceMotion *motion = motionManager.deviceMotion; if (!motion) { return; } attitude = motion.attitude; NSLog(@"roll = %f... pitch = %f ... yaw = %f", degrees(attitude.roll), degrees(attitude.pitch), degrees(attitude.yaw)); } ``` ![enter image description here](https://i.stack.imgur.com/qb6hU.png)
iPhone gyroscope - why is YAW and PITCH connected?
CC BY-SA 2.5
0
2011-03-05T20:27:48.303
2012-06-07T02:57:06.110
2011-03-06T21:01:14.563
538,964
538,964
[ "iphone", "gyroscope" ]
5,206,848
1
5,206,883
null
1
3,231
I have a settings bundle with the following settings. When I build/install my app the Settings.app appears to work correctly. I see the default value and everything. But in my app when trying to read the text field's text I get nil. ![enter image description here](https://i.stack.imgur.com/0Xx6w.png) Here is how I read the settings ``` NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSString *temp = [defaults stringForKey:@"url_preference"]; ```
Why is this simple settings bundle not reading anything?
CC BY-SA 2.5
null
2011-03-05T21:20:19.037
2011-03-05T21:24:46.510
null
null
253,456
[ "iphone", "ipad", "ios", "settings", "application-settings" ]
5,206,863
1
5,207,230
null
0
628
I have a Cocoa app I'm working on and I get a different result in appearance for the [NSToolbar](http://developer.apple.com/library/mac/#documentation/cocoa/reference/ApplicationKit/Classes/NSToolbar_Class/Reference/Reference.html) I am using for the main window. Specifically, I'm using a search field as the last [NSToolbarItem](http://developer.apple.com/library/mac/#documentation/cocoa/reference/ApplicationKit/Classes/NSToolbarItem_Class/Reference/Reference.html) and, whereas under Snow Leopard it is displayed correctly: ![enter image description here](https://i.stack.imgur.com/pnWeL.png) it is cut under Leopard: ![enter image description here](https://i.stack.imgur.com/yZvJW.png) Looking at those two versions it appears that the spaces I put between the items are not respected under Leopard. I also saw that sometimes, after I make some update at the toolbar in Interface Builder, these changes are not mirrored in the running application even under Snow. I have to drag the default bar from the customizing menu in order to see them. The reason for the NSToolbar not always mirroring what is in the .nib file resides in the autosave mechanism that was enabled for me, as NSGod suggested. What can be the cause of this misbehavior? Is there something about constraints, (minimum and maximum) sizes that I should have taken into account? Feel free to point some documentation to me Is there a way to programmatically introduce item and spaces into a NSToolbar or check the consistency (at run time) of those entered with Interface Builder?
NSToolbar looks different in Leopard and Snow Leopard
CC BY-SA 2.5
0
2011-03-05T21:22:26.493
2011-04-08T10:17:32.127
2011-03-09T13:34:31.867
370,158
370,158
[ "objective-c", "cocoa", "osx-snow-leopard", "osx-leopard", "nstoolbar" ]
5,206,928
1
5,207,368
null
4
954
I am really hoping to get a definitive answer to this. I have a previous question where I asked ["What is a thread (really)?"](https://stackoverflow.com/questions/5201852/what-is-a-thread-really) I got some really good answers and my takeaway from this was that a Thread is: > A thread is an independent set of values for the processor registers (for a single core). Since this includes the Instruction Pointer (aka Program Counter), it controls what executes in what order. It also includes the Stack Pointer, which had better point to a unique area of memory for each thread or else they will interfere with each other. i.e. > A thread isn't anything more "concrete" than a set of register values and > The exact list of CPU registers depends on the architecture, but instruction pointer and stack pointer are pretty much universal. They define a thread insofar as when this thread (set of register values) is loaded in the processor core, the thread is running. The processor is fetching instructions demanded by the thread and updating the thread registers. When a context switch is needed, the processor saves this set of register values into memory and loads a set belonging to a different thread, typically as part of the interrupt servicing logic. In addition, I understand threads have TLS (Thread Local Storage) and their own Call Stack. , a thread's (as I have put in my title) are the register values, its TLS, and its call stack. I want to know the components of the other items in my title (processes, appdomains, and contexts). Here is a diagram from the book I am reading (Pro C# 2008 and the .NET Platform) ![The Win32 Process/Thread Relationship](https://i.stack.imgur.com/TgaKV.png) I understand this diagram pertains to Win32 Processes, but I think the same TLS, call Stack idea holds for .NET. Also, I think this diagram would be much better if it included thhe register values (or something to indicate that there were register values) that defined these threads (A and B). Now I am continuing my investigation, and I want to just ask this all at once. I want to know the same information for Processes, AppDomains, and Contexts (and this is the order that I understand as the "hierarchy" of hosting, i.e. processes host appdomains, appdomains host contexts, contexts host threads). My ultimate goal is to get enough information that I can diagram the relationships between all these entities (or whatever they are), but also the components that actually make them up (for instance in the case of threads, there are register values, TLS, and call stack that actually make them up). When I do, I will post the diagram up on this question as an edit at the end. For now, here is a diagram taken from the book I am reading (as regards processes, app domains, and contexts): ![Processes, application domains, and context boundaries](https://i.stack.imgur.com/xLPto.png) P.S. if someone knows of a diagram out there that already explains all this I would love to see it. If not . . . why the heck is there not one?? ![Processes, Application Domains, Contexts and Threads - components and their relationships](https://i.stack.imgur.com/mfYth.jpg)
What are the different "components" that make up Processes, AppDomains, Contexts, and Threads (and what are their relationships)?
CC BY-SA 3.0
0
2011-03-05T21:33:24.543
2015-06-11T18:32:57.363
2017-05-23T12:13:39.697
-1
568,289
[ ".net", "process", "applicationdomain" ]
5,206,992
1
5,298,908
null
2
511
![Manual Recipient Entry](https://i.stack.imgur.com/DD86y.png) Hi, Please consider the custom wp7 message box above. I am looking to see what is the cleanest way to bind a views textbox to a property on the view model only after a button is clicked. The only way I can work out is to have two properties and use a command on the button to assign the value of the first prop to the main prop. The main prop should only receive the value from the textbox only if the user clicks the tick button and not if they cancel (by pressing the back button). I am using MVVM Light.
Conditional binding using mvvm light on wp7
CC BY-SA 2.5
null
2011-03-05T21:47:22.127
2011-03-14T13:02:12.127
2011-03-06T00:27:39.813
207,202
207,202
[ "c#", "windows-phone-7", "binding", "mvvm-light" ]
5,207,310
1
5,209,708
null
0
1,673
could you help me find a component that draw such a tree in c#.thanks. ![enter image description here](https://i.stack.imgur.com/Y0h8c.jpg)
decision tree component
CC BY-SA 2.5
null
2011-03-05T22:47:53.500
2011-03-06T09:31:16.457
2011-03-05T22:52:05.877
12,178
245,304
[ "c#" ]
5,207,626
1
5,211,571
null
0
446
Im have made a navigation bar for the top of site, the final look i wanted in the end was, simple text menu but then when you hover items the background changes using a background image. I have managed to do this and in all browsers when you hover over the background changes and it is fine, but in internet explorer 7 it looks like this... ![enter image description here](https://i.stack.imgur.com/gvX3g.png) I have tried changing the heights and widths, but still cannot get IE7 to go the same as the others? The HTML code for the navigation is ``` <ul class="buttonleft"> <li><a href="#language"><img id="topflag" src="images/flags/gb.png" alt="GB"/> English <img src="images/arrow.png" alt="GB" /></a></li> <li><a href="#search">Search and Book <img src="images/arrow.png" alt="GB" /></a></li> <li><a href="#offers">Latest Offers <img src="images/arrow.png" alt="GB" /></a></li> </ul> ``` the CSS is ``` .buttonleft li{float:left;margin-top:-9px;display:inline;list-style:none;margin-right:6px} .buttonleft li a{color:#D9D9D9;font:normal 13px Tahoma;text-decoration:none;height:36px;width:auto;padding:10px} .buttonleft li a:hover{background:url(../images/topbgover.png)} img{border:0} #topflag{margin-right:3px;margin-left:3px} ``` Any help would be great :D
HTML and CSS Issues with IE7 Navigation
CC BY-SA 2.5
null
2011-03-05T23:51:04.937
2011-03-06T16:00:33.290
null
null
351,260
[ "html", "css", "internet-explorer-7", "navigation", "html-lists" ]
5,207,949
1
5,308,234
null
5
1,403
The window's contentView has NSTextFields. (MacOS) i'm using interface builder to setup the window and its features, so nothing in awakeFromNib except this: ``` [[self.window contentView] setWantsLayer:YES]; CALayer *layer = [[self.window contentView] layer]; CGColorRef lightGray = CGColorCreateGenericGray(0.93, 1.0); [layer setBackgroundColor:lightGray]; CGColorRelease(lightGray); ``` However, the textField's focus ring is not visible outside the bounds of the textField. With layer: ![](https://i.stack.imgur.com/1rxFJ.png) Without a layer: ![](https://i.stack.imgur.com/z5nlU.png) i'm thinking that this display issue is something bigger than this, but i can't find an example of this problem, (and solution). anyone?
How to fix focus ring's highlight being clipped when using CALayer?
CC BY-SA 2.5
0
2011-03-06T01:06:29.160
2011-03-15T06:27:15.483
2011-03-06T01:49:28.047
285,618
673,836
[ "objective-c", "cocoa", "core-animation", "nstextfield" ]
5,208,028
1
6,565,396
null
1
751
![bevel](https://i.stack.imgur.com/Xshfk.png) Do you see the thin bevel highlight on top? How do you do this in CSS with only one HTML tag? I'm guessing it has something to do with `outline`. This is what I have so far without the bevel: ``` <a class="callToAction">Click here</a> .callToAction { border: 1px solid #000; -moz-border-radius: 0.4em; background: -moz-linear-gradient( top, #ccc, #999 ); } ```
Bevel highlight with no additional markup
CC BY-SA 2.5
0
2011-03-06T01:30:32.030
2011-07-03T20:31:36.047
2011-03-06T02:17:06.750
459,987
459,987
[ "html", "css" ]
5,208,020
1
5,208,165
null
1
585
The script below computes the subtotal and total of given items. ``` <script type="text/javascript"> $(function(){ $('input[type=button]').click(function(){ }); $('input[id^=qty]').keyup(function(){ var gtotal=0; var parentDiv = $(this).closest('#korokor'); var curprice=parentDiv.find('input[id^=price]').val(); var curqty= this.value; var curtotal=curprice * curqty; parentDiv.find('input[id^=subtotal]').val(curtotal); $('input[id^=subtotal]').each(function(index) { var currentnum= $(this).val(); var intnum =parseInt(currentnum); gtotal=gtotal + intnum; }); $('input[name=supertotal]').val(gtotal); $('input[name=payment]').val(gtotal); }); }); </script> <?php $viewcarter=mysql_query("SELECT * FROM prod_table WHERE CURRP=1"); ?> </head> <body> <table border="1"> <tr> <th>ID</th> <th>PRODUCT</th> <th>QA</th> <th>PRICE</th> <th>QTY BUY</th> <th>SUBTOTAL</th> <th>REMOVE</th> </tr> </table> <?php if(mysql_num_rows($viewcarter)==0){ //no products }else{ while($row=mysql_fetch_assoc($viewcarter)){ ?> <form name="blabber" method="get" action="expander.php"> <div id="korokor"> <table border="1"> <tr> <td><?php echo $row['PID']; ?></td> <td><?php echo $row['PRODUCT']; ?></td> <td><?php echo $row['QTYHAND']; ?></td> <td><?php echo $row['S_PRICE']; ?></td> <input type="hidden" id="pids" name="ids[]" value="<?php echo $row['PID']; ?>"> <input type="hidden" id="pname" name="product[]" value="<?php echo $row['PRODUCT']; ?>"> <input type="hidden" name="dprice[]" value="<?php echo $row['B_PRICE']; ?>"> <input type="hidden" name="sprice[]" id="<?php echo 'price'.$row['PID']; ?>" value="<?php echo $row['S_PRICE']; ?>"/> <input type="hidden" name="qoh[]" value="<?php echo $row['QTYHAND']; ?>"/> <td><input type="text" name="qbuys[]" id="<?php echo 'qty'.$row['PID']; ?>"/></td> <td><input type="text" name="subtotal[]" id="<?php echo 'subtotal'.$row['PID']; ?>"/></td> <td><a href="pagmasdan.php?action=2&id=<?php echo $row['PID']; ?>"><img src="delete-icon.png"></img></a></td> </tr> </table> </div> <?php } ?> Grand Total:<input type="text" name="supertotal" value=""/><br/> Customer:<input type="text" name="customer" value=""/><br/> Payment:<input type="text" name="payment" value=""/><br/> <input type="submit" value="sell"/> </form> <?php } ?> ``` It works, but I have a little problem with its appearance: ![enter image description here](https://i.stack.imgur.com/8PW9g.png) I tried to place them all in one table to make it more pleasing but the script which computes the values at keyup no longer works. I need a little help in modifying the appearance of the interface.
Computing values on keyup using jQuery
CC BY-SA 4.0
null
2011-03-06T01:28:47.580
2018-07-14T19:38:43.790
2018-07-14T19:38:43.790
4,370,109
225,269
[ "php", "jquery", "css", "html-table" ]
5,208,501
1
5,515,316
null
3
4,953
The structure that I want to draw should be exactly like the one shown. Thanks!![enter image description here](https://i.stack.imgur.com/pyimb.jpg)
How to draw this tree like lattice structure in Matlab?
CC BY-SA 2.5
null
2011-03-06T03:34:24.340
2017-05-21T05:41:03.743
2017-05-21T05:41:03.743
52,738
null
[ "matlab", "plot", "tree", "structure" ]
5,208,562
1
null
null
1
731
Im trying to build a gallery like this with jquery: ![enter image description here](https://i.stack.imgur.com/47CQP.jpg) I want to have a different background image in each container div, as well as a different image(img) in each div. I also want the divs to fade in one after the other, as well as fade out when a new page is loaded. How would i set this up?
Image Gallery With Container Divs
CC BY-SA 2.5
null
2011-03-06T03:49:18.203
2011-03-07T00:25:45.610
null
null
544,140
[ "jquery", "css", "html", "gallery" ]
5,208,722
1
5,208,765
null
0
1,742
Work on . I have . After read the file, I need to store the file information in database. My database table structure is below: ``` CREATE TABLE [dbo].[StoreTxtValues] ( [PortCode] [int] (80) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 1)[Vessel] [varchar] (800) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 2)[Voyage] [varchar] (800) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 3)[Sailed] [datetime] NOT NULL, 4)[Carrier] [varchar] (800) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 5)[LoadingContainer] [varchar] (800) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 6)[DischargeSeal] [varchar] (800) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, 7)[rowValue] [varchar] (8000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, ) ``` ![1),2),3),4),5),6),7)](https://i.stack.imgur.com/slBBm.jpg) Please see those numbers in the picture. I need help to store the data as I describe on it. Any suggestion will be accepted. Thanks in advance.
How to Store txt information in database SQL Server
CC BY-SA 2.5
null
2011-03-06T04:34:41.363
2011-03-06T15:51:06.330
2011-03-06T06:06:11.960
297,114
336,100
[ "c#", ".net", "text", "windows" ]
5,208,811
1
5,208,931
null
4
505
Using the Boost Graph Library, is it possible to get the port identifiers for an edge? Example: After calling `read_graphviz`, I can iterate through the edges of this graph and print their `node_id`s -- I get "A -> B, A -> B". How can I print something like "A:p0 -> B:p1, A:p0 -> B:p2"? ``` digraph G { A [label="A|<p0>p0"]; B [label="B|<p1>p1|<p2>p2"]; A:p0 -> B:p1; A:p0 -> B:p2; } ``` ![Rendering of digraph G](https://i.stack.imgur.com/N6lmE.png)
How to get port identifiers for an edge using Boost Graph Library?
CC BY-SA 2.5
0
2011-03-06T05:00:08.197
2011-03-06T07:43:34.420
2011-03-06T07:43:34.420
198,315
238,387
[ "c++", "boost", "graphviz", "boost-graph" ]
5,208,872
1
5,209,565
null
0
2,259
I am trying to make a jquery plugin for which the description is given below. I haven't had much experience working in jQuery so I really needed some help. Here is the Java Applet I am talking about [http://www.inference.phy.cam.ac.uk/dasher/TryJavaDasherNow.html](http://www.inference.phy.cam.ac.uk/dasher/TryJavaDasherNow.html) The applet does some operation the result is shown in the text box in the applet. ![enter image description here](https://i.stack.imgur.com/wdH8d.jpg) Consider a virtual keyboard which comes up when the user clicks on a text box or a text area element. For eg: ![enter image description here](https://i.stack.imgur.com/anwf2.jpg) Similarly, I wanted that the applet should appear when the user clicks on TextBox/TextArea element and after some operations, the result in the applet text box should go into the html text element. I hope I am able to make myself clear. Please help me regarding this. I haven't been working with jQuery but this can be done with its use.
Show a Java applet on clicking on HTML Text elements
CC BY-SA 2.5
0
2011-03-06T05:19:22.823
2011-05-31T13:35:32.037
2011-03-12T12:48:25.183
458,790
458,790
[ "jquery", "html", "applet" ]
5,208,904
1
5,298,149
null
4
8,758
I need to generate a chart like this one: ![positve/negative chart](https://i.stack.imgur.com/vCinF.gif) Specifically, I want to show both a positive value and a negative value for a time period (could be an hour, minute, etc.) and display it like this. I could have sworn I saw something like this on the [Google Visualization API Gallery](http://code.google.com/apis/visualization/documentation/gallery.html) the other day, but I can't find it now, and am not even sure what this kind of chart is called. First, do you know what this kind of chart is called so I can possibly find documentation? Second, is there any way to implement such a chart with the Google Visualization API? If not, is there another common charting solution for web that I can achieve this with? Thank you for your time.
Postive/Negative Chart in Google Visualization API
CC BY-SA 2.5
0
2011-03-06T05:28:46.327
2017-11-17T16:24:03.970
null
null
362,536
[ "charts", "google-visualization" ]
5,209,120
1
5,309,413
null
1
461
I've a backend website where the user can add textareas in a section and later I save all the $_POST["array[]"] in the database. My actual HTML code is: ``` <textarea class="context" name="context[]"></textarea> <textarea class="context" name="context[]"></textarea> <textarea class="context" name="context[]"></textarea> ``` If I post this I get 3 results for context. My problem is when I load via AJAX. The exact view that my PHP loads is: ``` <textarea class="context" name="context[]"></textarea> ``` And I see how in firebug is loaded and is exactly like the above. My loader code is: ``` $("a#add-conx").live("click", function(){ $("#ajax-loader").fadeIn('normal'); $.ajax({ url: BASE_URL + 'projects/ajax/get_textarea', type: "POST", success: function(data) { $("textarea.context:last").after(data); } }); $("#ajax-loader").fadeOut("normal"); return false; }); ``` And it works fine because it adds exactly next to the last context. But when I post it, i only get results for the first and not for the ajax-loaded ones. Anyone knows why? Thank you in advance! : When the page is load: ![enter image description here](https://i.stack.imgur.com/d7j5y.png) After adding some content dynamically: ![enter image description here](https://i.stack.imgur.com/DtQuF.png) Code that actually I'm using: ``` $("a#add-conx").click(function(){ $("#ajax-loader").fadeIn('normal'); $("textarea.context:last").after('<textarea class="context" name="context[]"></textarea>'); $("#ajax-loader").fadeOut("normal"); return false; }); ``` And when I get the $_POST["context"] I ONLY get the first 4 textareas, the ones that I've not created. Why??? Thank you!
Passing various values for a textarea as array but only detects the original textareas and NOT the loaded via AJAX
CC BY-SA 2.5
null
2011-03-06T06:33:43.813
2011-03-15T08:55:35.913
2011-03-06T10:12:17.063
569,908
569,908
[ "php", "jquery" ]
5,209,375
1
5,209,410
null
0
799
I'm making an app that has more options than will easily fit into a UITabBarController. I wanted to use something like what the facebook app has for its main menu. ![facebook main menu](https://i.stack.imgur.com/YRXRk.png) My guess is that it isn't proprietary to facebook, because the SCVNGR app uses something similar. ![SCVNGR main menu](https://i.stack.imgur.com/cvg2o.png) This library lets you re-order the icons the way you can re-order the apps from the main menu (i.e. press and hold -> icons jiggle -> you can drag them around). Does anyone know what library provides this UIView? I'd like to use it if possible. Thanks!
What library is used for the main menu in the facebook iOS app?
CC BY-SA 2.5
null
2011-03-06T07:59:20.410
2011-03-06T08:08:08.047
null
null
195,625
[ "iphone", "ios", "uiview", "uiviewcontroller", "menu" ]
5,209,545
1
5,211,045
null
47
80,214
I've seen a few questions like this in my search, but either the question didn't get answered properly or no answer was given. So, I'll ask again. ``` <style> .parent { overflow-y:scroll; overflow-x:visible; width:100px; } .child { position:relative; } .child-menu { position:absolute; top:0px; left:-100px; display:inline-block; } </style> <div class="parent"> <!-- Lots of the following divs --> <div class="child"> Text Line <div class="child-menu">some pop out stuff</div> </div> </div> ``` Alright, that's just an example. But basically, what I'm trying to accomplish is have the .child classes be scrollable on the y axis...scroll up and down. But I want the x-axis....the child-menu's to be visible outside the .parent container. Does that make sense? So what is happening is that when the page renders, the browser is interpreting the overflow as auto altogether and not respecting the separate axis. Am I doing something wrong or are the browsers just not up to CSS3 spec yet on this? Mostly only tested on Chrome. ![enter image description here](https://i.stack.imgur.com/nQC0X.png)
CSS overflow-y:visible, overflow-x:scroll
CC BY-SA 2.5
0
2011-03-06T08:47:10.330
2020-01-23T06:44:34.497
null
null
266,763
[ "css", "overflow" ]
5,209,627
1
5,209,642
null
3
795
How do I remove the specific column, from a `DataGridView` control, that is indicated in the picture? ![](https://i.stack.imgur.com/vjtp9.gif)
How can I remove unnecessary columns in a DataGridView?
CC BY-SA 2.5
null
2011-03-06T09:07:01.063
2011-03-06T09:13:00.160
2011-03-06T09:13:00.160
366,904
484,390
[ "c#", ".net", "winforms", "datagridview" ]
5,209,741
1
5,209,879
null
5
564
I've been creating something like text editor for a while and noticed one interesting feature in NetBeans: when creating Java Application from a template (for example, "Desktop Application"), it creates immutable blocks of code (they are present for viewing but they can not be modified directly). This shot should make all that text above clear: ![enter image description here](https://i.stack.imgur.com/lm622.jpg) So, the question is: how to implement such a feature using JTextPane?
JTextPane immutable text blocks
CC BY-SA 3.0
0
2011-03-06T09:42:18.003
2011-10-02T13:21:59.057
2011-10-02T13:21:59.057
714,968
330,471
[ "java", "swing", "netbeans", "jtextpane" ]
5,209,986
1
5,210,215
null
3
2,376
I have an image where I want to find a specific location (coordinate) based on its color. For example ![enter image description here](https://i.stack.imgur.com/jmsVN.jpg) I want to find coordinates of edges of this Black box.
Find Specific Color in an Image
CC BY-SA 3.0
0
2011-03-06T10:35:14.487
2013-01-31T09:33:56.253
2013-01-31T09:33:56.253
1,900,417
340,046
[ "java", "image-processing", "pattern-matching", "color-picker" ]
5,210,153
1
5,795,094
null
1
1,574
We recently added a small silverlight client that loads on every page load. However for the visitors who for some reason don`t want to upgrade their silverlight version they are seeing this annoying message on every single page load: ![enter image description here](https://i.stack.imgur.com/Y90DA.png) From where is this alert triggered and how can I stop it from being triggered? I`ve looked in the silverlight.js file but can`t find it. Following is the code where the Silverlight app is embeded: ``` <div id="silverlightControlHost"> <script type="text/javascript" src="http://$CommonHelps.GetSiteInfoByDomain().ContentDomainJavascript/Silverlight.js"></script> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="5" height="5" > <param name="source" value="/ClientBin/AppLaunch.Bloc.Frontend.SilverLight.UserOnlineClient.xap"/> <param name="onError" value="AppLaunch.Chatbar.onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value="3.0.40818.0" /> <param name="autoUpgrade" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" target="_blank"> Install silverlight to chat with your friends </a> </object> <iframe id="_sl_historyFrame"></iframe> </div> <p id="UserOnlineClientConnectionClientEx"></p> ```
How to customize or remove the SilverLight Update alert box?
CC BY-SA 2.5
null
2011-03-06T11:20:14.580
2011-04-26T18:56:09.033
null
null
442,542
[ "silverlight" ]
5,210,445
1
5,210,557
null
1
568
Within my application I would like to show a web page within a view in the application. I am not sure how to apply the view on just a part of the application and open a web page within the view. The web page within the view will open when the user clicks a button. The webview will be on the right hand side of the screen like in the image below: ![enter image description here](https://i.stack.imgur.com/7RD41.jpg) Is this possible? Please help. Thanks Edit: I have included a tablelayout within the relative layout I already had. ``` <TableLayout android:layout_width="200dip" android:layout_height="100dip" android:stretchColumns="1" android:background="#000000" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_marginLeft="250px" android:layout_marginTop="80px"> <TableRow> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </TableRow> </TableLayout> ``` I then call the webview in my application like this within an onclick button: ``` mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl("http://www.google.com"); ``` But nothing happens when I click this?
Webview on a part of the application
CC BY-SA 2.5
null
2011-03-06T12:26:06.610
2011-03-06T13:13:11.430
2011-03-06T13:13:11.430
634,239
634,239
[ "android", "webview" ]