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,401,995
1
null
null
2
192
I am lost at how can I fix this problem ... Chrome is the top 1 and FireFox below ![enter image description here](https://i.stack.imgur.com/ZXKYp.jpg) CSS looks like ``` #mainnav ul { background: #a51c10; padding: 5px 0; margin: 0; -moz-box-shadow: 0 2px 6px rgba(60,60,60,0.8); -webkit-box-shadow: 0 2px 6px rgba(60,60,60,0.8); box-shadow: 0 2px 6px rgba(60,60,60,0.8); position: relative; z-index: 2; } #mainnav li { display: inline; padding: 0; margin: 0 2px; position: relative; } #mainnav a:link, #mainnav a:visited { padding: 4px 10px 5px; font-size: 16px; line-height: 1em; font-weight: bold; color: #a29061; text-decoration: none; } ``` it looks alittle different somehow from the working site (I dont think I can post a link tho) but copy & paste CSS [http://jsfiddle.net/aM8rn/4/](http://jsfiddle.net/aM8rn/4/) it appears I should put line-height: 1em in the `#mainnav ul` [http://jsfiddle.net/aM8rn/5/](http://jsfiddle.net/aM8rn/5/)
Why is chrome offseting my <a> abit too high (vs FireFox)
CC BY-SA 2.5
0
2011-03-23T07:20:31.737
2011-03-23T09:53:21.800
2011-03-23T07:52:33.927
637,041
637,041
[ "css" ]
5,402,196
1
5,402,242
null
3
1,563
I was using Jquery ui auto-complete with version 1.8.2 and later i shifted to 1.8.11. I started having problems. ![auto complete in jquery 1.8.2](https://i.stack.imgur.com/qH5q2.png) 1.8.2 ![auto complete in jquery 1.8.11](https://i.stack.imgur.com/W3NYy.png) 1.8.11 ``` $('#term').autocomplete({ minLength : 4, source : rootPath+'/search', select: function(event, ui) { window.location = ui.item.url; } }); ``` 1. How can i fix it 2. and Where can in http://jqueryui.com/ i can get 1.8.2 Thanks
jquery ui auto complete
CC BY-SA 2.5
null
2011-03-23T07:47:32.467
2013-10-08T13:09:50.313
2011-03-23T07:54:11.323
406,659
406,659
[ "jquery", "jquery-ui" ]
5,402,243
1
5,405,851
null
0
4,159
This is my `SQL`; ``` select a.hesap_no, a.teklif_no1 || '/' || a.teklif_no2 as teklif, a.mus_k_isim as musteri, b.marka, c.sasi_no, c.sasi_durum, d.tas_mar, nvl(risk_sasi(a.teklif_no1, a.teklif_no2, c.urun_sira_no, c.sira_no), 0) as risk, nvl(mv_sasi(a.teklif_no1, a.teklif_no2, c.sira_no, c.urun_sira_no, sysdate), 0) as mv from s_teklif a, s_urun b, s_urun_detay c, koc_ktmar_pr d where a.teklif_no1 || a.teklif_no2 = b.teklif_no1 || b.teklif_no2 ``` This is my `MV_SASI` Function; ``` create or replace FUNCTION MV_SASI ( TEK1 IN VARCHAR2, TEK2 IN NUMBER, SIRA IN NUMBER, USIRA IN NUMBER, DT IN DATE ) RETURN NUMBER IS MV number; fat number; adet number; pd number; pds number; kt date; ktv number; dtv number; frk number; yfrk number; TKM VARCHAR2(10); BEGIN SELECT COUNT(*) INTO adet FROM S_URUN_DETAY WHERE (SASI_DURUM IS NULL OR SASI_DURUM IN ('A','R')) AND TEKLIF_NO1 = TEK1 AND TEKLIF_NO2 = TEK2; SELECT SUM(CASE WHEN B.SASI_DURUM IS NULL OR B.SASI_DURUM IN ('A','R') THEN A.KDV_FIYAT ELSE 0 END) INTO fat FROM S_URUN A,S_URUN_DETAY B WHERE A.TEKLIF_NO1 = tek1 AND A.TEKLIF_NO2 = tek2 AND A.TEKLIF_NO1 = B.TEKLIF_NO1 AND A.TEKLIF_NO2 = B.TEKLIF_NO2 AND A.SIRA_NO = B.URUN_SIRA_NO; SELECT KULLAN_TARIH INTO kt FROM S_TEKLIF WHERE TEKLIF_NO1 = tek1 AND TEKLIF_NO2 = tek2 ; yfrk:= EXTRACT(YEAR FROM dt) - EXTRACT(YEAR FROM kt); ktv := EXTRACT(MONTH FROM kt); dtv := EXTRACT(MONTH FROM dt); frk := yfrk * 12 + (dtv-ktv); IF frk <= 0 THEN pd := fat * 0.85; ELSE pd := fat*0.85 - (fat * 0.0101 * frk); END IF; SELECT NVL(ROUND((CASE WHEN SASI_DURUM IS NULL OR SASI_DURUM IN ('A','R') THEN pd / adet ELSE 0 END),2),0) INTO pds FROM S_URUN_DETAY WHERE TEKLIF_NO1 = TEK1 AND TEKLIF_NO2 = TEK2 AND URUN_SIRA_NO = USIRA AND SIRA_NO = SIRA; RETURN pds; END; ``` But in my page i getting an error with this line of code; ``` OracleDataReader dr = myCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection); ``` ![enter image description here](https://i.stack.imgur.com/OvWu3.png) Where am i doing wrong? Best Regards, Soner myCommand is; ``` select a.hesap_no, a.teklif_no1 || '/' || a.teklif_no2 as teklif, a.mus_k_isim as musteri, b.marka, c.sasi_no, c.sasi_durum, d.tas_mar, nvl(risk_sasi(a.teklif_no1, a.teklif_no2, c.urun_sira_no, c.sira_no), 0) as risk, nvl(mv_sasi(a.teklif_no1, a.teklif_no2, c.sira_no, c.urun_sira_no, sysdate), 0) as mv from s_teklif a, s_urun b, s_urun_detay c, koc_ktmar_pr d where a.teklif_no1 || a.teklif_no2 = b.teklif_no1 || b.teklif_no2 and a.teklif_no1 || a.teklif_no2 = c.teklif_no1 || c.teklif_no2 and b.sira_no = c.urun_sira_no and b.distributor = d.dist_kod and b.marka = d.marka_kod and b.urun_kod = d.tas_kod and a.hesap_no in (select a.hesap_no from s_teklif a where a.mus_k_isim in (system.collections.arraylist) ) ```
Invalid Identifier in Oracle Function
CC BY-SA 2.5
null
2011-03-23T07:52:31.733
2011-03-23T18:52:42.473
2011-03-23T18:52:42.473
4,311
447,156
[ "sql", "database", "oracle", "function" ]
5,402,328
1
5,402,388
null
2
2,258
I m having following screen, ![enter image description here](https://i.stack.imgur.com/vws10.png) I am using Following code to make Layout to show tabhost and tab widget ![enter image description here](https://i.stack.imgur.com/N57Lr.png) I want to place the tabs at bottom . Please tell how to do this.
How to show tabs At Bottom rather then at top?
CC BY-SA 2.5
0
2011-03-23T08:04:18.877
2014-02-27T13:37:45.243
null
null
395,661
[ "android" ]
5,402,446
1
10,979,616
null
0
245
I have this problem: ![enter image description here](https://i.stack.imgur.com/WT6FK.png) The `Vehicle` type derives from the `EntityObject` type which has the property "ID". I think i get why L2S can't translate this into SQL- it does not know that the WHERE clause should include `WHERE VehicleId == value`. `VehicleId` btw is the PK on the table, whereas the property in the object model, as above, is "ID". Can I even win on this with an Expression tree? Because it seems easy enough to create an `Expression` to pass to the `SingleOrDefault` method but will L2S still fail to translate it? I'm trying to be DDD friendly so I don't want to decorate my domain model objects with `ColumnAttributes` etc. I am happy however to customize my L2S dbml file and add Expression helpers/whatever in my "data layer" in the hope of keeping this ORM-business far from my domain model. I'm not using the object initialization syntax in my select statement. Like this: ``` private IQueryable<Vehicle> Vehicles() { return from vehicle in _dc select new Vehicle() { ID = vehicle.VehicleId }; } ``` I'm actually using a constructor and [from what I've read](https://stackoverflow.com/q/1397394/56145) this will cause the above problem. This is what I'm doing: ``` private IQueryable<Vehicle> Vehicles() { return from vehicle in _dc select new Vehicle(vehicle.VehicleId); } ``` I understand that L2S can't translate the expression tree from the screen grab above because it does not know the mappings which it would usually infer from the object initialization syntax. How can I get around this? Do I need to build a `Expression` with the attribute bindings?
Will manual Linq-To-Sql mapping with Expressions work?
CC BY-SA 3.0
null
2011-03-23T08:14:30.343
2017-04-07T08:48:03.007
2017-05-23T12:25:34.510
-1
56,145
[ "linq-to-sql", ".net-4.0", "domain-driven-design", "expression-trees" ]
5,402,898
1
5,405,654
null
16
7,110
I have some spatially-distributed data. I'm plotting this with `matplotlib.pyplot.hexbin` and would like to change the "background" (i.e. zero-value) colour. An example is shown below - my colour-map of choice is `matplotlib.cm.jet`: ![Example data](https://i.stack.imgur.com/X1UzW.png) How can I change the base colour from blue to white? I have done something similar with masked arrays when using `pcolormesh`, but I can't see anyway of doing so in the `hexbin` arguments. My instinct would be to edit the colourmap itself, but I've not had much experience with that. I'm using matplotlib v.0.99.1.1
Zero-value colour in matplotlib hexbin
CC BY-SA 3.0
0
2011-03-23T09:07:04.643
2020-09-16T09:11:12.703
2012-07-31T09:00:03.023
623,518
130,116
[ "python", "matplotlib", "plot" ]
5,403,137
1
5,407,942
null
0
1,969
I am writing a dictionary application, and i am trying to import raw data from strings, one string per word. Amongst other things, the raw input strings contain the names of the parts of speech the corresponding word belongs to. In my datamodel I have a separate entity for `Word`s and `PartOfSpeech`, and i want to create one entity of the type `PartOfSpeech` for each unique part of speech there may be in the input strings, and establish the relationships from the `Word`s to the relevant pars of speech. The `PartOfSpeech` entity has just one Atribute, `name`, and one-to-many relationship to the `Word`: ![enter image description here](https://i.stack.imgur.com/s7zJl.png) My first implementation of getting unique `PartOfSpeech` entities involved caching them in a mutable array and filtering it each time with a predicate. It worked, but it was slow. I decided to speed it up a bit by caching the PartsOfSpeech in an NSDictionary, and now when i try and save the datastore after the import, i get the error "Cannot save objects with references outside of their own stores.". It looks like the problem is in the dictionary, but how can i solve it? Here is the code that worked: (in both sniplets `managedObjectContext` is an ivar, and `processStringsInBackground:` method runs on a background thread using `performSelectorInBackground:withObject:` method) ``` - (void) processStringsInBackground:(NSFetchRequest *)wordStringsReq { NSError *err = NULL; NSFetchRequest *req = [[NSFetchRequest alloc] init]; [req setEntity:[NSEntityDescription entityForName:@"PartOfSpeech" inManagedObjectContext:managedObjectContext]]; err = NULL; NSMutableArray *selectedPartsOfSpeech = [[managedObjectContext executeFetchRequest:req error:&err] mutableCopy]; NSPredicate *p = [NSPredicate predicateWithFormat:@"name like[c] $name"]; // NSPredicate *formNamePredicate = [NSPredicate predicateWithFormat:<#(NSString *)predicateFormat#>] ... for (int i = 0; i < count; i++){ ... currentPos = [self uniqueEntityWithName:@"PartOfSpeech" usingMutableArray:selectedPartsOfSpeech predicate:p andDictionary:[NSDictionary dictionaryWithObject:partOfSpeech forKey:@"name"]]; ... } } - (NSManagedObject *) uniqueEntityWithName:(NSString *) entityName usingMutableArray:(NSMutableArray *)objects predicate:(NSPredicate *)aPredicate andDictionary:(NSDictionary *) params { NSPredicate *p = [aPredicate predicateWithSubstitutionVariables:params]; NSArray *filteredArray = [objects filteredArrayUsingPredicate:p]; if ([filteredArray count] > 0) { return [filteredArray objectAtIndex:0]; } NSManagedObject *newObject = [NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:managedObjectContext]; NSArray *dicKeys = [params allKeys]; for (NSString *key in dicKeys) { [newObject willChangeValueForKey:key]; [newObject setPrimitiveValue:[params valueForKey:key] forKey:key]; [newObject didChangeValueForKey:key]; } [objects addObject:newObject]; return newObject; } ``` And here is the same, but with caching using NSMutableDictionary, which fails to save afterwards: ``` - (void) processStringsInBackground:(NSFetchRequest *)wordStringsReq { NSError *err = NULL; [req setEntity:[NSEntityDescription entityForName:@"PartOfSpeech" inManagedObjectContext:managedObjectContext]]; NSArray *selectedPartsOfSpeech = [managedObjectContext executeFetchRequest:req error:&err]; NSMutableDictionary *partsOfSpeechChache = [[NSMutableDictionary alloc] init]; for (PartOfSpeech *pos in selectedPartsOfSpeech) { [partsOfSpeechChache setObject:pos forKey:pos.name]; } ... for (int i = 0; i < count; i++){ ... currentPos = [self uniqueEntity:@"PartOfSpeech" withName:partOfSpeech usingDictionary:partsOfSpeechChache]; ... } } - (NSManagedObject *)uniqueEntity:(NSString *) entityName withName:(NSString *) name usingDictionary:(NSMutableDictionary *) dic { NSManagedObject *pos = [dic objectForKey:name]; if (pos != nil) { return pos; } NSManagedObject *newPos = [NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:managedObjectContext]; [newPos willChangeValueForKey:@"name"]; [newPos setPrimitiveValue:name forKey:@"name"]; [newPos didChangeValueForKey:@"name"]; [dic setObject:newPos forKey:name]; return newPos; } ``` Could you help me to find the problem? Best regards, Timofey.
Core Data, caching NSManagedObjects in NSMutableDictionary, Problems
CC BY-SA 2.5
null
2011-03-23T09:30:41.313
2015-09-13T22:41:54.947
2011-03-23T10:38:26.333
457,406
241,552
[ "caching", "core-data" ]
5,403,247
1
5,403,465
null
0
1,869
I am working on URL rewrite and I found one tutorial on asp.net site, The way I am doing it is URL I am entering [http://localhost:1573/WebNew/web/first-web](http://localhost:1573/WebNew/web/first-web) Now I have wriiten one class ``` public class FixURLs : IHttpModule { public FixURLs() { // // TODO: Add constructor logic here // } #region IHttpModule Members public void Dispose() { // do nothing } public void Init(HttpApplication context) { context.BeginRequest += new EventHandler(context_BeginRequest); } #endregion void context_BeginRequest(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; /*// checking page extension switch (System.IO.Path.GetExtension(app.Request.Url.AbsoluteUri.ToLower())) { case ".bmp": case ".gif": case ".jpg": case ".jpe": case ".jpeg": case ".png": case ".css": case ".js": case ".txt": case ".swf": // don't redirect, these requests may required in many cases return; break; }*/ if (app.Request.RawUrl.ToLower().Contains("/web/")) { **if (app.Request.RawUrl.ToLower().Contains(".png") || app.Request.RawUrl.ToLower().Contains(".gif") || app.Request.RawUrl.ToLower().Contains(".js")) { return; } ** DatabaseLayer dbLayer = new DatabaseLayer(); string urlFromBrowser = app.Request.RawUrl.ToLower(); string[] urlFormat = urlFromBrowser.Split('/'); urlFromBrowser = urlFormat.GetValue(2).ToString() + "/" + urlFormat.GetValue(3).ToString(); int WebId = dbLayer.GetWebURLId(urlFromBrowser.Trim()); app.Context.RewritePath("Default.aspx", "", "WebId="+WebId); } } ``` But the problem is that, it is not redirecting to the Default.aspx page. I am getting the below error: Description: 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. Requested URL: /WebNew/web/Default.aspx I can see that it is requesting the URL /webNew/web/Default.aspx but I just need /webnew/default.aspx?WebId=2 Please assist me Thnks for the answer, but I am not able to accept your answer nor the comment button is working for me, that is the reason I am editing my post . I am getting JavaScript error: Object expected and Object question is null. ![enter image description here](https://i.stack.imgur.com/m1hUH.jpg) @Waqas Raja Thanks for you answer, it is working fine now. But when I placed the breakpoint at (!IspostBack) event of Default.aspx page, I can see that it is coming aroung times. After loading the page few images are gone. Is multiple refresh is the issue? Any idea why it is going again and again to if(!IsPostBack) event. Thanks for your help @Waqas Raja I will accept you answer after login from the differnt browser. @Waqas Raja I am showing image on my home page like this There are other few images which are also being displayed in this manner, they all are coming properly when loading normally but when I am using URL rewriting I can see only alt text. I have tried this also but same result. :-( any suggestion? By checking the raw url i can see that there are many request other than the page, i.e. jpg,.js just like you mentioned. I have updated the code, is it correct? because I am not able to see images and few javascript functions. @Waqas Raja Thanks a lot for your assistance. I can now see the images. I have removed the HTML image to asp:Image controla and keeping ImageURL as ~/images/facebook_icon.png. But I still can't see the JS file effects on the page, I put src="~/JS/jQuery.js" but it is still not working. I have placed the code mentioned by you in my Class [Just where you have guided me].
Page not redirecting properly, URL rewriting (Asp.NET)
CC BY-SA 2.5
0
2011-03-23T09:41:09.593
2011-03-23T12:36:45.773
2011-03-23T12:36:45.773
609,582
609,582
[ "asp.net", "urlrewriter" ]
5,403,474
1
5,404,386
null
0
1,327
I have created a Distribution certificate, & a Distribution Provisioning Profile for Ad-Hoc Distribution/ AppStore submission. I have made all the necessary changes in Info.plist, Entitlements file, Targets -> Build of the project. I'm getting an error. i've attached screen shot of this error.![enter image description here](https://i.stack.imgur.com/c0XOW.png) This error seems to be occurring coz I've no profiles currently matching for iphone distribution![.](https://i.stack.imgur.com/SxThm.png). It displays 'profile doesn't match any valid certificate/ private key pair in default keychain'. I've checked the certificate & its valid.
CodeSign Error while preparing App for distribution using Distribution certificate
CC BY-SA 2.5
0
2011-03-23T09:59:29.273
2011-03-23T11:16:31.220
null
null
557,906
[ "iphone" ]
5,403,596
1
null
null
1
238
We need to draw partially transparent images from a WinAPI imagelist. `ImageList_DrawIndirect()` with ILS_ALPHA works fine in Win7, but doesn't work in Windows XP - the transparent regions of the icon are grey. The result looks like this: ![enter image description here](https://i.stack.imgur.com/lW6GD.png)
Does ImageList_DrawIndirect with fState = ILS_ALPHA works on Windows XP?
CC BY-SA 2.5
0
2011-03-23T10:09:27.980
2011-11-24T18:11:15.697
2011-03-23T11:08:05.627
505,088
669,038
[ "windows", "winapi", "windows-xp", "transparency", "imagelist" ]
5,403,639
1
5,403,830
null
2
3,033
[http://www.e-fluential.com/offline/](http://www.e-fluential.com/offline/) Screen grab: ![enter image description here](https://i.stack.imgur.com/MDiIV.jpg) I can't get the div that the blue words blah blah is in to be automatic width, its just going full width from the margin i've set.. ``` .titlesmedium { font-family: title_font; letter-spacing: -1px; font-size:30px; margin-left: 340px; margin-top:-5px; color:#00C3FA; border-bottom: solid 1px #00C3FA; } ```
Why isn't my div using automatic width?
CC BY-SA 2.5
null
2011-03-23T10:14:39.567
2011-03-23T12:58:20.853
2011-03-23T10:41:34.540
27,615
647,981
[ "css", "html", "width" ]
5,403,668
1
null
null
0
102
I am getting the following error when i use my app over a period of time between 10-15 minutes,the app hangs and fails to perform any operations further.I use all the functionality provided in the app.I am using Core Plot framework for graph functionality.I cannot figure out the cause of this error. ![enter image description here](https://i.stack.imgur.com/V8gIZ.png) NOTE:When i check the memory usage with the help of Allocation tools...the usage does not go beyond 4.5 MB. Thanks
"Failed to suspend in time" error
CC BY-SA 2.5
null
2011-03-23T10:17:13.340
2011-03-23T10:32:55.320
2011-03-23T10:25:32.310
493,770
493,770
[ "iphone", "objective-c", "xcode", "ios4", "graph" ]
5,403,721
1
null
null
6
25,202
I'm trying to loop through the session. But I can't seem to get the expected results. I'm still trying to explore things. So please teach me a better way to do this. If you find my code unsecure or inappropriate. First I have this login form: ``` <form name="x" action="login.php" method="post"> Username:<input type="text" name="uname" value=""></input><br/> Password:<input type="password" name="pword" value=""></input> <input type="submit" value="login"></input> </form> ``` And here's login.php which sets the session if the record is found on the mysql database: ``` <?php require_once("conn.php"); $username=$_POST['uname']; $pword=md5($_POST['pword']); echo $username."<br/>"; echo $pword; $check=mysql_query("SELECT * FROM users WHERE Uname='$username' AND Hpword='$pword'"); if(mysql_num_rows($check)==0){ header('Location:loginform.php'); }else{ session_start(); while($result=mysql_fetch_assoc($check)){ $_SESSION['uid'].=$result['ID']; $_SESSION['uname'].=$result['Uname']; } } ?> ``` And here's the file which loops through the session: ``` <?php session_start(); echo "Logged in users:<br/>"; foreach($_SESSION as $sir){ } echo "User id: ". $_SESSION['uid']."<br/>"; echo "Username: ".$_SESSION['uname']."<br/>"; ?> ``` I get this: ![enter image description here](https://i.stack.imgur.com/bq08u.png) While I'm expecting to get something like this: User id: 1 Username: yoh User id: 2 Username: max
How to loop through session array in php
CC BY-SA 2.5
0
2011-03-23T10:20:23.257
2012-06-19T13:18:45.080
null
null
472,034
[ "php", "mysql", "session" ]
5,403,784
1
null
null
2
673
I have not find any tutorial about using xcode's "Fix and Continue feature". If someone knows how to use this please let me know. I would like to use this feature in iOs Apps. Does some knows a way to use this. Whenever I use this I got error "classname.m dylib" not found. Here is a screen-shot when using fix and continue feature for iPhone apps. ![enter image description here](https://i.stack.imgur.com/Qz8iL.png)
How to use xcode's Fix and Continue debugging feature?
CC BY-SA 3.0
null
2011-03-23T10:24:40.533
2011-04-12T05:10:06.193
2011-04-12T05:10:06.193
83,905
83,905
[ "objective-c", "xcode", "debugging" ]
5,403,988
1
5,404,036
null
1
1,667
I want to get rid of this... BUT only for one project from solution.. is it possible? ![enter image description here](https://i.stack.imgur.com/lm2uf.png)
How can I get rid of annoying "file has been modified outside" message window
CC BY-SA 2.5
0
2011-03-23T10:42:16.290
2012-03-23T00:49:38.680
2012-03-23T00:49:38.680
3,043
474,290
[ "visual-studio" ]
5,403,970
1
null
null
15
8,227
I'm trying to place in single row the `EditText` with the `ImageView` on the left. But I can't get the image to be scaled properly to match the height of text entry. The layout is simple: ``` <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:adjustViewBounds="true" android:scaleType="fitStart" android:background="#f00" android:src="@drawable/icon" /> <EditText android:id="@+id/text" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> ``` (I highlighted image background by red color to see the actual space allocated by ImageView) --- If I specify the exact height for `ImageView`: ``` android:layout_height="48dp" ``` then I get the closest view what I needed: ![enter image description here](https://i.stack.imgur.com/uf1ug.png) But I do not know the exact height of `EditText`, so I can't specify it for `ImageView` here. --- When the height for `ImageView` is specified to fill its parent (to match ``EditText` height): ``` android:layout_height="fill_parent" ``` then I get unexpected extra margin between the image and text entry: ![enter image description here](https://i.stack.imgur.com/bBSw9.png) Actually, in this case the `ImageView` width equals to unscaled image width, whereas the image was scaled. --- It's the similar to picture shown below if I specify `layout_height` to `48dp` and set `adjustViewBounds` to `false`: ``` android:layout_height="48dp" android:adjustViewBounds="false" ``` ![enter image description here](https://i.stack.imgur.com/Ple2v.png) --- So, the question here is: how to define the layout correctly to scale the image to match edit entry height and in the same time to have width of `ImageView` to be shrunk to scaled image width ? In other words how to get rid this extra space off?
ImageView: adjustViewBounds does not work with layout_height="fill_parent"?
CC BY-SA 2.5
0
2011-03-23T10:40:21.030
2011-10-12T18:30:29.307
2011-03-23T11:56:11.243
653,311
653,311
[ "android", "imageview", "scale" ]
5,404,029
1
5,404,358
null
0
232
# update I created a content type: periode in this type I created a field training days: now I want that a user can choose monday: and select morning or afternoon (checkbox) the same for thursday and other days in the week. My goal is that I have a title Monday and that I can select morning and/or afternoon. And this for all day's of the week.![enter image description here](https://i.stack.imgur.com/Hn3kI.png)
checkboxes in content type
CC BY-SA 2.5
null
2011-03-23T10:45:49.487
2011-03-23T17:17:48.970
2020-06-20T09:12:55.060
-1
642,760
[ "php", "drupal", "drupal-6", "content-type" ]
5,404,063
1
null
null
1
2,102
I'm building a single user blog with Drupal 7. I use Article content type as blog entry. I need to customize the look of node. I also added a taxonomy field to article refering category. and I need to display this and tags in my node at a particular place. So, I wrote the code and get the variables (shown below) but how can I display these variables in my with links to a page lists other article entries have these tags, categories? These are array and I need to display each array item with links :/ ![enter image description here](https://i.stack.imgur.com/wZlcF.jpg) Appreciate helps!!!! Thanks a lot!
Drupal 7: displaying array variables with its links in node.tpl.php
CC BY-SA 2.5
null
2011-03-23T10:48:54.723
2011-03-23T12:35:43.240
null
null
150,225
[ "php", "arrays", "drupal", "drupal-7", "drupal-theming" ]
5,404,238
1
5,404,300
null
0
308
Problem in my sql syntax I get the error: ``` ERROR [HY000] [MySQL][ODBC 3.51 Driver][mysqld-5.5.9]Not unique table/alias: 'WallPosting' ``` Code: ``` { string theUserId = Session["UserID"].ToString(); using (OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=x; Password=x;")) { cn.Open(); using (OdbcCommand cmd = new OdbcCommand("SELECT WallPosting.Wallpostings FROM WallPosting LEFT JOIN WallPosting ON User.UserID = WallPosting.UserID WHERE User.UserID=" + theUserId + "", cn)) // problem in select statement using (OdbcDataReader reader = cmd.ExecuteReader()) { var divHtml = new System.Text.StringBuilder("<div id=mysqlcontent>"); while (reader.Read()) { divHtml.Append(String.Format("{0}", reader.GetString(0))); } divHtml.Append("</div>"); test1.InnerHtml = divHtml.ToString(); } } } ``` My sql script and table structure: ![enter image description here](https://i.stack.imgur.com/hLIWY.jpg) ``` SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; CREATE SCHEMA IF NOT EXISTS `gymwebsite2` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; USE `gymwebsite2` ; -- ----------------------------------------------------- -- Table `gymwebsite2`.`User` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `gymwebsite2`.`User` ( `UserID` INT NOT NULL AUTO_INCREMENT , `Email` VARCHAR(245) NULL , `FirstName` VARCHAR(45) NULL , `SecondName` VARCHAR(45) NULL , `DOB` VARCHAR(45) NULL , `Location` VARCHAR(45) NULL , `Aboutme` VARCHAR(1045) NULL , `username` VARCHAR(45) NULL , `password` VARCHAR(45) NULL , PRIMARY KEY (`UserID`) ) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `gymwebsite2`.`WallPosting` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `gymwebsite2`.`WallPosting` ( `idWallPosting` INT NOT NULL AUTO_INCREMENT , `UserID` INT NOT NULL , `Wallpostings` VARCHAR(2045) NULL , PRIMARY KEY (`idWallPosting`) , INDEX `fk_WallPosting_User` (`UserID` ASC) , CONSTRAINT `fk_WallPosting_User` FOREIGN KEY (`UserID` ) REFERENCES `gymwebsite2`.`User` (`UserID` ) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `gymwebsite2`.`Pictures` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `gymwebsite2`.`Pictures` ( `idPictures` INT NOT NULL AUTO_INCREMENT , `UserID` INT NOT NULL , `picturepath` VARCHAR(1045) NULL , PRIMARY KEY (`idPictures`) , INDEX `fk_Pictures_User1` (`UserID` ASC) , CONSTRAINT `fk_Pictures_User1` FOREIGN KEY (`UserID` ) REFERENCES `gymwebsite2`.`User` (`UserID` ) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; ```
error in mysql syntax?
CC BY-SA 2.5
null
2011-03-23T11:03:43.463
2011-03-23T11:08:32.923
null
null
477,228
[ "c#", "asp.net", "mysql", "sql", "html" ]
5,404,691
1
null
null
2
1,761
i started using tinyMCE, and got a copy of the filemanager and imagemanager from a fellow coder, so i could try them before buying. I'm using CodeIgniter, but right now i'm trying to configure it in a clean html index file on the root of my server. the wysiwyg works perfectly, ImageManager works perfectly but i can't seem to run FileManager: ([screenshot](http://screencast.com/t/tQCswdXgVr3)). I've debugged the process, line by line, but can't understand how the invocation of "pages/fm/index.html" work because of all those variables like `{#common.directory}` . I think my problem is in the config.php file, because when i debug the process, everything works well until this last condition in index.php: ``` if ($man->isAuthenticated()) { $man->dispatchEvent("onInit"); header("Location: pages/". $config["general.theme"] ."/" . $page . $suffix); die(); } else { header("Location: ". $config["authenticator.login_page"] . "?return_url=" . urlencode($_SERVER['REQUEST_URI'])); die(); } ``` it verifies `($man->isAuthenticated)`, the header Location url is well resolved to the above mentioned `"pages/fm/index.html"` but in firebug i get the error: ![Firebug error](https://i.stack.imgur.com/bOK7C.png) As i said before, Imagemanager follows a pretty similar process, and all is working well. Thank you very much
tinyMCE - Filemanager and ImageManager integration (PHP)
CC BY-SA 2.5
null
2011-03-23T11:41:50.670
2011-09-02T13:58:51.170
null
null
470,772
[ "php", "tinymce" ]
5,404,898
1
5,411,879
null
1
212
Hey, I'm trying to make a basic hockey style game. I have the basic physics working with the pitch, a player, an opponent, and a ball. I'm struggling to figure out how I can allow the ball to travel into the goal while keeping the player and opponent from going into the goal. Basically the opponent follows the ball, and the player is controlled by user input. so there are two restrictions I need. I need to create a shape that only the ball can go through... is this even possible? Maybe I can sleep the opponent if the ball passes the goal line? Am I going about it the right way? Player1 can only move around in the red box Player2 can only move around in the green box The ball can move around in the outer blue box ![playing field layout](https://i.stack.imgur.com/DMBvb.png)
Differentiating between ball and player in goal collision
CC BY-SA 2.5
0
2011-03-23T12:00:25.987
2011-03-23T21:37:59.370
2011-03-23T21:37:59.370
654,275
149,615
[ "java", "box2d", "jbox2d" ]
5,405,041
1
5,405,116
null
1
1,632
I am trying to display a simple alert working on my activity when no internet connection is available, however, for some reason I dont know, when I set the icon for the alert, the box gets messy, too big. Below is my code: ``` @Override protected Dialog onCreateDialog(int id) { switch (id) { case 1: return new AlertDialog.Builder(SplashScreen.this) .setTitle("Aviso") .setIcon(R.drawable.alert_dialog_icon) .setMessage("Acesso à internet não disponível. Clique OK para sair.") .setCancelable(false) .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { SplashScreen.this.finish(); } }) .create(); } return null; } ``` the result of this code is displayed in the image below. ![device screenshot](https://i.stack.imgur.com/lCIU4.png) What am I doing wrong? Am I missing anything? This code was straightly copied from the API demos source code, which works perfectly in my device. Thanks a lot T
Android Dialog (not custom) problem
CC BY-SA 2.5
null
2011-03-23T12:11:07.357
2012-09-11T09:57:08.663
2011-03-23T12:26:50.213
473,070
491,604
[ "android", "android-alertdialog" ]
5,405,204
1
5,415,325
null
1
1,173
I have a custom dialog that extends the SmartGWT dialog. My problem is that the title and the close button of the dialog aren't displayed in the dialog's title but in the dialog's content under all other elements. Here is a screeshot: ![Incorrect title placement](https://i.stack.imgur.com/yYxEv.png) The bold and the button should be in the dialog's title. My code basically is: ``` public class MyDialog extends Dialog { public MyDialog() { super(); this.setTitle("test"); this.setShowTitle(true); this.setShowCloseButton(true); this.setShowMaximizeButton(false); this.setShowMaximizeButton(false); this.setShowStatusBar(false); this.setShowShadow(true); this.setWidth("500px"); this.setHeight("300px"); } @Override protected void onInit() { Label lab = new Label("test"); this.addMember(lab); } } ``` Is this a bug in SmartGWT or am I missing something? How can I place the title correctly? Thanks for any help!
SmartGWT Dialog title not set correctly
CC BY-SA 2.5
null
2011-03-23T12:24:56.157
2011-03-24T05:56:41.983
null
null
494,428
[ "java", "gwt", "smartgwt" ]
5,405,884
1
null
null
6
5,993
Given the following database model, would you define the deletion relationships between the models? I figured out the basic table association setup but when I want to add dependencies to enable the I get lost. ![Database relationship model](https://i.stack.imgur.com/vxce7.png) Here is the relationship model I created. ``` class User < ActiveRecord::Base has_many :studies end class Study < ActiveRecord::Base has_many :internships belongs_to :student, :class_name => "User", :foreign_key => "user_id" belongs_to :subject belongs_to :university, :class_name => "Facility", :foreign_key => "facility_id" accepts_nested_attributes_for :subject, :university, :locations end class Subject < ActiveRecord::Base has_many :studies end class Internship < ActiveRecord::Base belongs_to :study belongs_to :company, :class_name => "Facility", :foreign_key => 'facility_id' accepts_nested_attributes_for :company, :study end class Facility < ActiveRecord::Base has_many :internships has_many :locations has_many :studies accepts_nested_attributes_for :locations end class Location < ActiveRecord::Base belongs_to :facility end ``` Where would you put `:dependent => :destroy` and `:allow_destroy => true` to enable the following scenarios? I do not want to confuse you. Therefore, I leave out my tryings. A user wants to delete an internship. - - - : A user wants to delete a study. - - - I am totally unsure whether I can add `:dependent => :destroy` only after `has_one` and `has_many` or also after `belongs_to`. --- Edit: To simplify the problem please stick to the following (reduced) example implementation. ``` class Study < ActiveRecord::Base belongs_to :subject accepts_nested_attributes_for :subject, :allow_destroy => true end class Subject < ActiveRecord::Base has_many :studies, :dependent => :destroy end ``` In my view I provide the following link. ``` <%= link_to "Destroy", study, :method => :delete, :confirm => "Are you sure?" %> ``` The path is based on the named routes given by a restful configuration in `routes.rb`. ``` resources :studies resources :subjects ``` The study will be deleted when I click the link - the subjects stays untouched. Why?
How to define allow_destroy and :dependent => :destroy in Rails?
CC BY-SA 2.5
0
2011-03-23T13:24:18.650
2015-07-21T19:20:24.497
2015-07-21T19:20:24.497
4,370,109
356,895
[ "ruby-on-rails", "ruby-on-rails-3", "nested", "dependencies" ]
5,405,906
1
5,406,040
null
1
196
I have a problem im trying to solve with css its best I show you with an image: ![enter image description here](https://i.stack.imgur.com/4QXLX.jpg) My css: ``` div#test { width:90%; z-index:1; padding:27.5px; border-top: thin solid #736F6E; border-bottom: thin solid #736F6E; color:#ffffff; margin:0 auto; } ``` Im trying to get it to wrap in all broswer types? The other problem im wondering is if you look at the first image and a cropted image below I would also like to try add an X plus comment and img (hyperlinks) to each div like so: ![enter image description here](https://i.stack.imgur.com/9IpV6.jpg) No sure if thats possible via css?
css problems and solution to adding to a div
CC BY-SA 2.5
null
2011-03-23T13:25:31.507
2011-03-23T13:35:36.757
2020-06-20T09:12:55.060
-1
477,228
[ "asp.net", "html", "css", "stylesheet" ]
5,406,522
1
5,406,721
null
1
33,300
Is there a way I could dynamically add a Image1 to the while loop in the below code (contained within the div) By this I mean actually adding an asp image to the div? via the code. At the moment as I see it the code looks for an asp image but Ive seen no way you can "add" it to my dynamic content: ``` using (OdbcCommand cmd = new OdbcCommand("SELECT Wallpostings FROM WallPosting WHERE UserID=" + userId + " ORDER BY idWallPosting DESC", cn)) { using (OdbcDataReader reader = cmd.ExecuteReader()) { var divHtml = new System.Text.StringBuilder(); while (reader.Read()) { divHtml.Append("<div id=test>"); divHtml.Append(String.Format("{0}", reader.GetString(0))); divHtml.Append("</div>"); } test1.InnerHtml = divHtml.ToString(); } } ``` Thought I had it with this: ``` var divHtml = new System.Text.StringBuilder(); while (reader.Read()) { divHtml.Append("<div id=test>"); divHtml.Append(String.Format("{0}", reader.GetString(0))); Image img = new Image(); img.ImageUrl = "~/userdata/2/uploadedimage/batman-for-facebook.jpg"; divHtml.Append(img); divHtml.Append("</div>"); } test1.InnerHtml = divHtml.ToString(); ``` I get a funky output tho? See picture: ![enter image description here](https://i.stack.imgur.com/1HINy.jpg) Ive also tryed this: ``` using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.Odbc; using System.Web.UI.WebControls.Image; using System.Web.UI.HtmlControls.HtmlGenericControl; using System.IO; public partial class UserProfileWall : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string theUserId = Session["UserID"].ToString(); PopulateWallPosts(theUserId); } public static string RenderHtmlString(this System.Web.UI.HtmlControls.HtmlGenericControl htmlControl) { string result = string.Empty; using (System.IO.StringWriter sw = new System.IO.StringWriter()) { var writer = new System.Web.UI.HtmlTextWriter(sw); htmlControl.RenderControl(writer); result = sw.ToString(); writer.Close(); } return result; } private void PopulateWallPosts(string userId) { using (OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=root; Password=commando;")) { cn.Open(); using (OdbcCommand cmd = new OdbcCommand("SELECT Wallpostings FROM WallPosting WHERE UserID=" + userId + " ORDER BY idWallPosting DESC", cn)) { using (OdbcDataReader reader = cmd.ExecuteReader()) { var divHtml = new System.Text.StringBuilder(); while (reader.Read()) { using (StringWriter sw = new StringWriter()) divHtml.Append("<div id=test>"); divHtml.Append(String.Format("{0}", reader.GetString(0))); Image img = new Image(); img.ImageUrl = "~/userdata/2/uploadedimage/batman-for-facebook.jpg"; divHtml.Append(img.RenderHtmlString()); //this line divHtml.Append("</div>"); } test1.InnerHtml = divHtml.ToString(); } } } } ``` But RenderHtmlString has no definition?
Adding asp.net image to div
CC BY-SA 2.5
null
2011-03-23T14:11:37.743
2012-07-31T11:07:48.363
2011-03-23T15:33:10.957
477,228
477,228
[ "c#", "asp.net", "html", "css" ]
5,406,719
1
null
null
5
251
I frequently use `Debug -> Exceptions -> check CLR Exceptions` during debugging sessions. Sometimes, an exception gets thrown and handled, but I really want to find the source of the exception. In order to do this without seeing first-chance exceptions that I don't care about, I start my app, and then check CLR Exceptions: ![enter image description here](https://i.stack.imgur.com/nCwkb.png) This gets really tedious, and I'd love to have a toggle button in my VS2010 toolbar that allows me to only set/reset CLR Exceptions at will, without having to key in +, , check the box, and then click OK (and then do the same process again to turn off the exceptions). I went into the toolbar customization, but all I could get was a button that bring up the Exceptions dialog. This is obviously less efficient than hitting +, . Does anyone know of another way to add this? Will it require a VS addin? A keystroke mapping would be nice as well. I've never used the Macro Recorder in VS ever, but maybe this is one place where it's necessary?
Need efficiency hack for debugging in Visual Studio 2010
CC BY-SA 3.0
0
2011-03-23T14:25:22.777
2011-06-16T12:51:50.277
2011-06-16T12:51:50.277
11,545
214,071
[ "visual-studio-2010", "exception", "customization", "toolbar" ]
5,407,153
1
5,416,768
null
1
4,151
You can customize the navigation in SP2010 via Site Settings > Navigation: ![enter image description here](https://i.stack.imgur.com/WYZg8.png) How would I go ahead and define a simple (!) navigation myself and deploy with via feature? I don't really want to create a custom master page - just like I would do via the frontend: Add two links to the menu and I'm happy. I read about a [custom site map provider](http://www.codeproject.com/KB/sharepoint/spnav.aspx) and using a [custom xml file and reference it in the web.config](http://www.endusersharepoint.com/2010/05/17/sharepoint-implementing-a-custom-navigation-scheme-across-multiple-site-collections-for-the-%E2%80%9Cnon-developer%E2%80%9D/), but I cannot believe it is not easier to simply modify some existing links in the global navigation and add some new ones - basically create my own menu. Let's go with an example: ``` Global Navigation Custom Folder Products --> lists/products More News --> lists/morenews Entertainment --> lists/entertainment Another Folder Somethingelse --> somethingelse.aspx ``` How would I go about and deploy this to my site and replace the global navigation?
Deploy custom Navigation / SiteMap via Feature?
CC BY-SA 2.5
0
2011-03-23T14:56:42.620
2011-05-26T15:48:40.927
null
null
266,453
[ "sharepoint", "deployment", "sharepoint-2010", "navigation" ]
5,407,178
1
null
null
2
2,717
Friends, I am using JSMOOTH installer for creating .exe file and Bundled my Default JRE path in it.. If the user doesn't have Java Virtual Machine in his system it has to use the Bundled JRE in my .exe file .. But its Redirecting to Download Page i tried with all skeleton option but fails to use the Bundled JRE.. There are 5 skeleton 1.Win Service 2.Autodownload wrapper 3.Console wrapper 4.Windowed Wrapper 5.Custom web downloader wrapper My Question are : 1.From this five option which option i have to select such that if user is not JVM it use my bundled JRE. The error i am getting is as follows " 1. If i use 1.Auto Download wrapper as my skeleton i am getting and 2. If i use CustomWeb downloader as my skeleton i am getting 3.If i use windowed wrappper as my skeleton Console i am getting ![this](https://i.stack.imgur.com/UCWMe.png) 1. If i use Console wrapper as my skeleton i am getting What i want is that if there is no JVM in User system it must use the Bundled JRE instead of asking to download the JAVA.. I reffered [this](http://jsmooth.sourceforge.net/docs/jsmooth-doc.html#N101B3) manual and do it so but still i cant achieve my Destination.. My JSmooth screens are ![JVMScreen](https://i.stack.imgur.com/OypXU.jpg) ![ExecutableScreen](https://i.stack.imgur.com/MBkaB.jpg) ![Application screen](https://i.stack.imgur.com/8Lfvd.jpg) I am having my JAR file in my desktop inside the folder Test and also my JRE folder inside it.. I tried by keeping my JRE near .exe and Default path..But all time it refers the default Java path's Jre...
Problem in Bundling JRE in JSmooth in Java
CC BY-SA 2.5
0
2011-03-23T14:58:05.893
2018-08-12T00:49:19.783
null
null
555,221
[ "java", "installation", "jvm" ]
5,407,253
1
5,408,059
null
0
1,133
I have a UIWebView in which I want to display a PDF file. The PDF file is located on a remote webserver and is therefore loaded like any other URL. ``` [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.findsmiley.fvst.dk/KontrolRapport.aspx?id=20328832&akt=1"]]]; ``` The PDF is not displayed correctly, though. I am not able to scroll or zoom the document. In the console I get the following error codes ( being the name of my application, of course) ``` Wed Mar 23 15:56:31 simonbs-macbook CafeHelmuth[1997] <Error>: Wed Mar 23 15:56:31 simonbs-macbook CafeHelmuth[1997] <Error>: Wed Mar 23 15:56:31 simonbs-macbook CafeHelmuth[1997] <Error>: Wed Mar 23 15:56:31 simonbs-macbook CafeHelmuth[1997] <Error>: Wed Mar 23 15:56:31 simonbs-macbook CafeHelmuth[1997] <Error>: Wed Mar 23 15:56:31 simonbs-macbook CafeHelmuth[1997] <Error>: Wed Mar 23 15:56:31 simonbs-macbook CafeHelmuth[1997] <Error>: Wed Mar 23 15:56:31 simonbs-macbook CafeHelmuth[1997] <Error>: Terminating in response to SpringBoard's termination. Program ended with exit code: 0 ``` On the image below you see that it does not scroll the web page but the view, which, of course, is wrong. Can anyone please help me make my web view display the PDF document correctly? ![UIWebView not scroll webpage](https://i.stack.imgur.com/CIoTW.png) Adding `webView.scalesPageToFit = YES;` before `loadRequest` makes it look a bit strange, though it does add zoom and scroll but it does not seem to be the right approach. Beneath are some images of this. ![When zoomed out](https://i.stack.imgur.com/WaSHE.png) When I zoom in the background becomes blue and.. Well, it looks strange. ![When zoomed in](https://i.stack.imgur.com/3Kmsi.png)
PDF not showed correctly in UIWebView
CC BY-SA 2.5
null
2011-03-23T15:02:38.573
2011-03-23T19:16:02.703
2011-03-23T19:16:02.703
486,845
486,845
[ "iphone", "pdf", "sdk", "uiwebview" ]
5,407,300
1
5,670,948
null
5
3,848
Ok, this is driving me nuts - I've searched all of the references and examples I can find and I still seem to be missing something really obvious. These are the tabs for a 7-day TV Guide (not normally with the red arrow, obviously :) )... ![enter image description here](https://i.stack.imgur.com/jAsEm.png) What I need to know is what is the object (View or Drawable I assume) that makes up the main body/background of a Tab itself? (as indicated by the red arrow) and how do I access it or have it automatically change its state colour to a list of my choice? Also, how can I get the state colour of the indicator TextView to follow suit? Example: In the capture above, it's readable because I've set the textColor to a static grey (instead of the bright white which disappeared on a selected tab). But I want it to automatically become black text on white tab (selected) and bright white text on black (for unselected). All help gratefully received.
Controlling Tab colour-state / size in a TabActivity?
CC BY-SA 2.5
0
2011-03-23T15:05:56.330
2016-09-02T19:29:51.293
2011-03-24T11:47:27.273
488,241
488,241
[ "android", "tabwidget", "tabactivity" ]
5,407,483
1
5,407,532
null
0
62
![Error after implementing the solution](https://i.stack.imgur.com/c6eEk.jpg) I have a code that i have to do it through LINQ ``` var airlineNameList = new List<string>(); foreach (DTTrip trip in contract_.Trips) { foreach (DTFlight flight in trip.ListOfFlights) { airlineNameList.Add(flight.AirLineName); } } ``` How can do it through LINQ. Note: contract_ is the object of class. Please Help..
code that i have to do it through LINQ
CC BY-SA 2.5
0
2011-03-23T15:19:16.810
2011-03-23T17:05:06.357
2011-03-23T17:05:06.357
264,697
397,868
[ "linq", "linq-to-objects" ]
5,408,021
1
5,409,012
null
1
5,713
I'm creating melodramatically some controls, and they don't appear, it needs some kind of a refresh method.. here's my layout: ![enter image description here](https://i.stack.imgur.com/AJrcF.jpg) it's a chat, and all those messages I'm creating them dynamically as the event appears, what I'm creating at startup, it does appear, but what I'm creating afterward fails to show, even if the code is ok, here's how am I creating the controls (by calling the following function): ``` - (void) AddNewMessage: (NSString *)msg date1:(NSString* ) date2 { NSString *backimage =[NSString stringWithString:@""]; NSString *who =[NSString stringWithString:@"1"]; calculatedHeight=floor( msg.length / 40 )*20; if (calculatedHeight<30) calculatedHeight=30; if ([who isEqualToString:@"1"]) { left=85; left_hour_button=25; backimage=@"green_bubble.png"; } else { left=5; left_hour_button=240; backimage=@"grey_bubble.png"; } UIButton *button1 = [[UIButton alloc] initWithFrame:CGRectMake(left, lastcalculatedHeight-10, 230, calculatedHeight+10)]; [button1 setBackgroundImage:[[UIImage imageNamed:backimage] stretchableImageWithLeftCapWidth:9 topCapHeight:13] forState:UIControlStateDisabled]; [button1 setEnabled:FALSE]; [scrollView addSubview:button1]; [button1 release]; UIButton *buttonTime = [[UIButton alloc] initWithFrame:CGRectMake(left, lastcalculatedHeight+40, 50, 20)]; [buttonTime setBackgroundImage:[[UIImage imageNamed:@"hour_bubble.png"] stretchableImageWithLeftCapWidth:9 topCapHeight:13] forState:UIControlStateDisabled]; [buttonTime setFrame:CGRectMake(left_hour_button, lastcalculatedHeight+calculatedHeight-30, 55, 25)]; [buttonTime setTitle:date2 forState:UIControlStateDisabled]; [buttonTime setTitleColor:[UIColor blackColor] forState:UIControlStateDisabled]; buttonTime.titleLabel.font=[UIFont fontWithName:@"Helvetica" size:8.0]; buttonTime.titleLabel.lineBreakMode= UILineBreakModeWordWrap; [buttonTime setEnabled:FALSE]; [scrollView addSubview:buttonTime]; [buttonTime release]; UILabel *labelMessage = [[UILabel alloc] initWithFrame:CGRectMake(left+5, lastcalculatedHeight-5, 220, calculatedHeight)]; [labelMessage setText:msg]; [labelMessage setFont:[UIFont fontWithName:@"Arial" size:12.0]]; [labelMessage setLineBreakMode:UILineBreakModeWordWrap]; [labelMessage setTextColor:[UIColor blackColor]]; [labelMessage setAdjustsFontSizeToFitWidth:NO]; [labelMessage setNumberOfLines:floor( msg.length / 40 )+2]; [labelMessage setBackgroundColor:[UIColor clearColor]]; [scrollView addSubview:labelMessage]; [labelMessage release]; lastcalculatedHeight+=calculatedHeight+20; totalHeight+=calculatedHeight; scrollView.contentSize = CGSizeMake(240, lastcalculatedHeight); } ``` How do I "refresh" the display? The scrollView is an object inside the Uiview from which the class derives Also I will want to scroll down to the bottom the scrollview, each time I'm adding a new message. I've seen [this post](https://stackoverflow.com/questions/952412/uiscrollview-scroll-to-bottom-programmatically) but either it doesn't work, or it acts weird on the simulator... haven't tried it on a device because I don't own an iPhone yet. it scrolls too much or at all, but if I go to another tab, then switch back, the scroll is scrolled at the bottom, and it even shows the controls I've created programmatically... Weird isn't it?
UIView or UIScrollView doesn't refresh the display on programmatically created controls
CC BY-SA 4.0
null
2011-03-23T15:54:36.877
2020-03-01T18:40:25.783
2020-03-01T18:40:25.783
1,033,581
249,071
[ "iphone", "uiscrollview", "refresh", "scroll" ]
5,408,276
1
5,408,843
null
40
60,957
I am looking to be able to generate a random uniform sample of particle locations that fall within a spherical volume. The image below (courtesy of [http://nojhan.free.fr/metah/](http://nojhan.free.fr/metah/)) shows what I am looking for. This is a slice through the sphere, showing a uniform distribution of points: ![Uniformly distributed circle](https://i.stack.imgur.com/udd8T.png) This is what I am currently getting: ![Uniformly Distributed but Cluster Of Points](https://i.stack.imgur.com/eu7Jc.png) You can see that there is a cluster of points at the center due to the conversion between spherical and Cartesian coordinates. The code I am using is: ``` def new_positions_spherical_coordinates(self): radius = numpy.random.uniform(0.0,1.0, (self.number_of_particles,1)) theta = numpy.random.uniform(0.,1.,(self.number_of_particles,1))*pi phi = numpy.arccos(1-2*numpy.random.uniform(0.0,1.,(self.number_of_particles,1))) x = radius * numpy.sin( theta ) * numpy.cos( phi ) y = radius * numpy.sin( theta ) * numpy.sin( phi ) z = radius * numpy.cos( theta ) return (x,y,z) ``` Below is some MATLAB code that supposedly creates a uniform spherical sample, which is similar to the equation given by [http://nojhan.free.fr/metah](http://nojhan.free.fr/metah). I just can't seem to decipher it or understand what they did. ``` function X = randsphere(m,n,r) % This function returns an m by n array, X, in which % each of the m rows has the n Cartesian coordinates % of a random point uniformly-distributed over the % interior of an n-dimensional hypersphere with % radius r and center at the origin. The function % 'randn' is initially used to generate m sets of n % random variables with independent multivariate % normal distribution, with mean 0 and variance 1. % Then the incomplete gamma function, 'gammainc', % is used to map these points radially to fit in the % hypersphere of finite radius r with a uniform % spatial distribution. % Roger Stafford - 12/23/05 X = randn(m,n); s2 = sum(X.^2,2); X = X.*repmat(r*(gammainc(s2/2,n/2).^(1/n))./sqrt(s2),1,n); ``` I would greatly appreciate any suggestions on generating a truly uniform sample from a spherical volume in Python. There seem to be plenty of examples showing how to sample from a uniform spherical shell, but that seems to be easier an easier problem. The issue has to do with the scaling - there should be fewer particles at a radius of 0.1 than at a radius of 1.0 to generate a uniform sample from the volume of the sphere. Fixed and removed the fact I asked for normally and I meant uniform.
Sampling uniformly distributed random points inside a spherical volume
CC BY-SA 3.0
0
2011-03-23T16:11:51.730
2022-03-18T21:54:11.420
2018-12-23T08:38:12.807
815,724
329,344
[ "python", "matlab", "random", "geometry", "uniform-distribution" ]
5,408,316
1
5,408,409
null
0
73
I am stuck with a logic problem here. I did a lot of thinking but I cant come up with a solution. So this application displays a table, My task was to add another table(BOTTOM) similar to one already present(TOP). This application is 5 years old and all the HTML and Javascript code(for sorting) are generated on the fly by Java classes. Process of execution is: first it calls getData(), than populateData() which eventually calls createTable method with parameters List Data, String strURL, boolean headerRow, boolean altRowColor. `createTable(rows, url, bHdrRow, bAltColor)` Here the variable strURL is the HTML link for First column fields. Requirement is that if a particular link(First column) is clicked on any of the two tables, the other table should execute the same way. (For example if LINK_1 takes TOP table one level down, than on clicking it BOTTOM table should move down one level as well. How do I make it work with Java. I dont want to go through triggering an onClick even for the tables.![enter image description here](https://i.stack.imgur.com/UzNk1.png)
Need help with this logic
CC BY-SA 2.5
null
2011-03-23T16:14:44.133
2011-03-23T16:20:54.520
null
null
449,035
[ "java" ]
5,408,329
1
null
null
11
2,483
simple question, but after jumping over to the new XCode 4 IDE and open the organizer and select the "Documentation", i can´t find a way how to display the "table of contents" of a visible class.. I think about a way how to display it before and the current web-documentation: Hope someone can answer it.. Thanks ![table of contents](https://i.stack.imgur.com/Md4Wa.png)
Xcode 4 - Documentation: How to show the Table of Contents?
CC BY-SA 2.5
0
2011-03-23T16:15:49.673
2018-01-24T05:22:47.930
2018-01-24T05:22:47.930
1,677,912
380,956
[ "iphone", "xcode4" ]
5,408,335
1
5,408,472
null
3
1,111
I have a child view within a parent view. If I resize the child, the parent is also resized. Can I make parent not being resized, when I resize the child? ![enter image description here](https://i.stack.imgur.com/FtfnS.png)
android: resize a child without resizing a parent
CC BY-SA 2.5
0
2011-03-23T16:16:10.603
2011-03-23T19:04:57.293
null
null
190,148
[ "android", "layout", "resize", "parent-child" ]
5,408,442
1
5,409,311
null
1
3,357
I want to add a subview programmatically to my view, `FirstViewController.xib`. For now this is how it looks like ![enter image description here](https://i.stack.imgur.com/y52PD.png) When I click on the compose button another view, `SecondViewController.xib`, pops up from the bottom. It has a navigation bar similar to what you see in the picture. No I want to add a subview: ``` TTMessageController* controller = [[[TTMessageController alloc] initWithRecipients:nil] autorelease]; [self.view addSubview:controller.view] ``` However I get a strange result. The `controller.view` is overlapping the sidebar: ![enter image description here](https://i.stack.imgur.com/7okqr.png) How can I solve that problem so that the navigation bar is visible.
Adding subview in xcode hides rest of the view
CC BY-SA 2.5
0
2011-03-23T16:23:18.520
2011-03-23T17:34:00.000
2011-03-23T16:41:45.210
401,025
401,025
[ "iphone", "xcode" ]
5,408,436
1
5,408,635
null
1
575
My code below gives me a problem, the image comes after the text I tryed changing round what goes first but if I place the div.innerhtml near the end I get no images when I load the page. As you can see in the image ive uploaded the Img is being set to the end of the text im also wondering is there a way I can cut the size down? ``` public partial class UserProfileWall : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string theUserId = Session["UserID"].ToString(); PopulateWallPosts(theUserId); } private void PopulateWallPosts(string userId) { using (OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Database=gymwebsite2; User=****; Password=****;")) { cn.Open(); using (OdbcCommand cmd = new OdbcCommand("SELECT Wallpostings FROM WallPosting WHERE UserID=" + userId + " ORDER BY idWallPosting DESC", cn)) { using (OdbcDataReader reader = cmd.ExecuteReader()) { var divHtml = new System.Text.StringBuilder(); while (reader.Read()) { System.Web.UI.HtmlControls.HtmlGenericControl div = new System.Web.UI.HtmlControls.HtmlGenericControl("div"); div.ID = "test"; div.InnerHtml = String.Format("{0}", reader.GetString(0)); Image img = new Image(); img.ImageUrl = "~/userdata/2/uploadedimage/batman-for-facebook.jpg"; img.AlternateText = "Test image"; div.Controls.Add(img); test1.Controls.Add(div); } } } } } protected void Button1_Click(object sender, EventArgs e) { string theUserId = Session["UserID"].ToString(); using (OdbcConnection cn = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver}; Server=<REMOVED>; Database=<REMOVED>; User=<REMOVED>; Password=<REMOVED>;")) { cn.Open(); using (OdbcCommand cmd = new OdbcCommand("INSERT INTO WallPosting (UserID, Wallpostings) VALUES (" + theUserId + ", '" + TextBox1.Text + "')", cn)) { cmd.ExecuteNonQuery(); } } PopulateWallPosts(theUserId); } } ``` ![enter image description here](https://i.stack.imgur.com/30Qhf.jpg) ``` <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <link href="css/style.css" rel="stylesheet" type="text/css" /> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.min.js" type="text/javascript"></script> <p> <asp:TextBox ID="TextBox1" name="TextBox1" runat="server" Rows="3" Height="47px" Width="638px"></asp:TextBox> </p> <p> <asp:Button ID="Button1" runat="server" Text="Post Message" Width="98px" onclick="Button1_Click" /> </p> <p> &nbsp;</p> <div id="test1" runat="server" /> </asp:Content> ``` Im trying to achieve this: (crop from paint) ![enter image description here](https://i.stack.imgur.com/9msbY.jpg) ignore the web ui parts! ``` div#test1 { } #test> img { float: left; height: 100px; /* You shouldn't resize images here. Should be done in C#*/ } #test > div { width:90%; z-index:1; padding:27.5px; border-top: thin solid #736F6E; border-bottom: thin solid #736F6E; color:#ffffff; margin:0 auto; white-space: pre; white-space: pre-wrap; white-space: pre-line; } ``` Tryed this to no success? Snippet from firebug: ``` <div id="ctl00_ContentPlaceHolder1_ContentPlaceHolder2_test">weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee<img style="border-width: 0px;" alt="Test image" src="userdata/2/uploadedimage/batman-for-facebook.jpg"></div> ```
My code below gives me a problem, the image comes after the text
CC BY-SA 2.5
0
2011-03-23T16:22:59.737
2011-03-23T17:26:31.240
2011-03-23T17:01:03.303
477,228
477,228
[ "c#", "asp.net", "html", "css" ]
5,408,641
1
null
null
0
1,353
From a User Interface design point of view when is it better to disable a control or to completely hide it. I have attached an example. In both case if the "Enable ASP.NET" checkbox is clicked the "Select. Net Version selector is enabled. ![Comparison](https://i.stack.imgur.com/aCbcQ.png)
Disabling a control vs hiding a control in ASP.NET
CC BY-SA 2.5
null
2011-03-23T16:38:08.907
2012-05-03T12:19:06.440
2012-05-03T12:19:06.440
741,249
444,772
[ "asp.net", "controls", "usability" ]
5,408,669
1
5,408,807
null
6
3,429
I'm building a simple Python raytracer with pure Python (just for the heck of it), but I've hit a roadblock. The setup of my scene is currently this: 1. Camera located at 0, -10, 0 pointing along the y-axis. 2. Sphere with radius 1 located at 0, 0, 0. 3. Imaging plane-thing is a distance of 1 away from the camera and has a width and height of 0.5. I'm shooting photons in a uniformly randomly distribution through the imaging plane, and if a photon happens to intersect an object, I draw a red dot on the image canvas corresponding to the point on the image plane through which the ray passed. My intersection code (I only have spheres): ``` def intersection(self, ray): cp = self.pos - ray.origin v = cp.dot(ray.direction) discriminant = self.radius**2 - cp.dot(cp) + v * v if discriminant < 0: return False else: return ray.position(v - sqrt(discriminant)) # Position of ray at time t ``` And my rendering code (it renders a certain number of photons, not pixel-by-pixel): ``` def bake(self, rays): self.image = Image.new('RGB', [int(self.camera.focalplane.width * 800), int(self.camera.focalplane.height * 800)]) canvas = ImageDraw.Draw(self.image) for i in xrange(rays): x = random.uniform(-camera.focalplane.width / 2.0, camera.focalplane.width / 2.0) z = random.uniform(-camera.focalplane.height / 2.0, camera.focalplane.height / 2.0) ray = Ray(camera.pos, Vector(x, 1, z)) for name in scene.objects.keys(): result = scene.objects[name].intersection(ray) if result: n = Vector(0, 1, 0) d = ((ray.origin - Point(self.camera.pos.x, self.camera.pos.y + self.camera.focalplane.offset, self.camera.pos.z)).dot(n)) / (ray.direction.dot(n)) pos = ray.position(d) x = pos.x y = pos.y canvas.point([int(self.camera.focalplane.width * 800) * (self.camera.focalplane.width / 2 + x) / self.camera.focalplane.width, int(self.camera.focalplane.height * 800) * (self.camera.focalplane.height / 2 + z) / self.camera.focalplane.height], fill = 128) ``` It should work properly, but when I render a test image, I get nothing that looks like the outline of a sphere: ![enter image description here](https://i.stack.imgur.com/MiaiM.png) I was expecting something like this: ![enter image description here](https://i.stack.imgur.com/9g9IA.png) Does anybody know why my code isn't functioning properly? I've been tweaking and rewriting this one part for way too long...
Python Raytracing
CC BY-SA 2.5
0
2011-03-23T16:39:50.073
2011-03-23T16:51:18.203
null
null
464,744
[ "python", "vector", "raytracing" ]
5,408,701
1
5,418,489
null
4
4,980
I am importing data from a MySQL table into MongoDB using Mongoid for my ORM. I am getting an error when trying to save an email address as a string. The error is: ``` /Library/Ruby/Gems/1.8/gems/bson-1.2.4/lib/../lib/bson/bson_c.rb:24:in `serialize': String not valid UTF-8 (BSON::InvalidStringEncoding) from /Library/Ruby/Gems/1.8/gems/bson-1.2.4/lib/../lib/bson/bson_c.rb:24:in `serialize' ``` From my GUI - this is a screenshot of the table info. You can see it's encoded in UTF8. ![table info](https://i.stack.imgur.com/3yCr9.png) Also from my GUI - this is a screen shot of the field in my MySQL table that I am importing ![what the data looks like in mysql GUI](https://i.stack.imgur.com/6OP2a.png) This is what happens when I grab the data from MySQL CLI. ![what the data looks like in mysql CLI](https://i.stack.imgur.com/jEq5R.png) And finally, when I inspect the data in my ruby object, I get something that looks like this: ![inspected ruby object](https://i.stack.imgur.com/MlAED.png) I'm a bit confused here because regardless my table is in UTF-8 and that funky is apparently valid UTF-8 character as a double byte. Anyone know why I'm getting this error?
String not valid UTF-8 (BSON::InvalidStringEncoding) when saving a UTF8 compatible string to MongoDB through Mongoid ORM
CC BY-SA 2.5
null
2011-03-23T16:42:57.527
2011-03-24T11:37:09.213
null
null
45,849
[ "ruby", "utf-8", "mongodb", "mongoid", "bson" ]
5,408,862
1
5,408,986
null
5
2,933
I'm trying to generate a plot using Matplotlib with a non-Latin character (a "μ") in an axis label, like this: ``` matplotlib.pyplot.xlabel(u'Sarcomere Length (μm)') ``` I'm using the Cairo renderer on Linux and I'm getting a "box" instead of "μ": ![Incorrect Axis Label](https://i.stack.imgur.com/MzZBw.png) It works with accented Latin characters (like "é"). Any ideas?
Matplotlib Unicode axis labels using the Cairo renderer
CC BY-SA 2.5
null
2011-03-23T16:56:47.963
2015-02-27T08:37:39.123
2015-02-27T08:37:39.123
3,687,447
99,005
[ "python", "unicode", "matplotlib", "label" ]
5,409,129
1
5,444,572
null
0
345
I have the following app, that's like a chat, so I'm programmatically creating some labels, images and buttons. The problem is that the ones that I'm adding at startup do show and the ones that I'm adding afterwards don't. It's like the view needs refreshing or something. If I call the same drawing function from an IBAction set to a button...it displays the content.. if it comes from the thread event that looks for new events and notifies the class through: ``` [[NSNotificationCenter defaultCenter] postNotificationName:@"NewMessageNotification" object:self userInfo:values]; ``` it then doesn't show anything. But the function is actually called (I've checked with the debugger) Could it be that it doesn't use the proper instance of the view? here's my layout: ![enter image description here](https://i.stack.imgur.com/1St8d.jpg) and here is my function that creates the controls: ``` UILabel *labelMessage = [[UILabel alloc] initWithFrame:CGRectMake(left+5, lastcalculatedHeight-5, 220, calculatedHeight)]; [labelMessage setText:msg]; [labelMessage setFont:[UIFont fontWithName:@"Arial" size:12.0]]; [labelMessage setLineBreakMode:UILineBreakModeWordWrap]; [labelMessage setTextColor:[UIColor blackColor]]; [labelMessage setAdjustsFontSizeToFitWidth:NO]; [labelMessage setNumberOfLines:floor( msg.length / 40 )+2]; [labelMessage setBackgroundColor:[UIColor clearColor]]; [scrollView addSubview:labelMessage]; [labelMessage release]; UIButton *buttonTime = [[UIButton alloc] initWithFrame:CGRectMake(left, lastcalculatedHeight+40, 50, 20)]; [buttonTime setBackgroundImage:[[UIImage imageNamed:@"hour_bubble.png"] stretchableImageWithLeftCapWidth:9 topCapHeight:13] forState:UIControlStateDisabled]; [buttonTime setFrame:CGRectMake(left_hour_button, lastcalculatedHeight+calculatedHeight-30, 55, 25)]; [buttonTime setTitle:date2 forState:UIControlStateDisabled]; [buttonTime setTitleColor:[UIColor blackColor] forState:UIControlStateDisabled]; buttonTime.titleLabel.font=[UIFont fontWithName:@"Helvetica" size:8.0]; buttonTime.titleLabel.lineBreakMode= UILineBreakModeWordWrap; [buttonTime setEnabled:FALSE]; [scrollView addSubview:buttonTime]; [buttonTime release]; ``` I also want to autoscroll the uiscrollview to bottom when I call this function..but it fails, it's like the simulator is going crazy when I call the following: I tried using ``` CGPoint offset = CGPointMake(0,lastcalculatedHeight); [scrollView setContentOffset: offset animated: YES]; ``` I got this from [UIScrollView scroll to bottom programmatically](https://stackoverflow.com/questions/952412/uiscrollview-scroll-to-bottom-programmatically)
Programmatically created labels and images don't show on screen
CC BY-SA 4.0
null
2011-03-23T17:18:30.707
2019-05-03T05:50:13.800
2019-05-03T05:50:13.800
1,033,581
249,071
[ "iphone", "uiscrollview", "autoscroll" ]
5,409,878
1
5,409,977
null
0
785
As from the [tutorial here](http://www.onextrapixel.com/2009/05/13/how-to-use-dl-dt-and-dd-html-tags-to-list-data-vs-table-list-data/), I can see that this is a valid markup dl, dt, dd structure, ``` <dl> <dt>Name: </dt> <dd>John Don</dd> <dt>Age: </dt> <dd>23</dd> <dt>Gender: </dt> <dd>Male</dd> <dt>Day of Birth:</dt> <dd>12th May 1986</dd> </dl> ``` but this only structure for a single person, what about multiple people/ persons? What about this below? I want to have a header and then followed by a list of items, ``` <dl class="name-header"> <dt>Name: </dt> <dt>Age: </dt> <dt>Gender: </dt> <dt>Day of Birth:</dt> </dl> <dl class="person-item"> <dd>John Don</dd> <dd>23</dd> <dd>Male</dd> <dd>12th May 1986</dd> </dl> <dl class="person-item"> <dd>John Don</dd> <dd>23</dd> <dd>Male</dd> <dd>12th May 1986</dd> </dl> ``` Thanks. ![enter image description here](https://i.stack.imgur.com/84EJ0.jpg)
dl, dt. dd for multiple list data
CC BY-SA 2.5
null
2011-03-23T18:28:14.640
2016-10-08T09:22:38.340
2011-03-23T18:53:04.360
106,224
413,225
[ "html" ]
5,410,114
1
5,416,264
null
1
237
I have a `FirstViewController` which is my . I have a compose button and I want to display the TTMessage Composer on click. This works fine. The problem is that there is no navigation bar to cancel the composer, so I have to add one. This how it looks like without a navigation bar by just presenting the message composer () modally. ![enter image description here](https://i.stack.imgur.com/sr49b.png) [I found this from three20 google group:](http://groups.google.com/group/three20/browse_thread/thread/6b72cad92eb1daa4) > Before you present the message controller, you have to create a navigation controller, push the message controller onto it, and then present the navigation controller modally. It seems like the solution for my problem but I do not understand it. Can anyone explain it with a little bit of code? I now the navigation controller from the objects panel and I can drag it on my nib files but what does it mean in this case? And what means "push"?
What does "push a controller onto another controller" mean?
CC BY-SA 2.5
0
2011-03-23T18:50:33.800
2011-03-24T07:58:36.107
2011-03-24T07:04:27.780
401,025
401,025
[ "iphone", "xcode", "three20" ]
5,410,278
1
null
null
23
3,329
Why does Microsoft not allow you to link a build configuration to a publish profile. Instead it tells you to use the dropdown in the main VS interface. ![Publish Dialog](https://i.stack.imgur.com/IoOHQ.png) I find this extremely annoying, because we use config transforms to change our config settings based on the environment we are publishing to (such as database connection strings). We also check-in the .Publish.xml file, so that the publish paths are saved in source control. If someone forgets to change the build configuration they could accidentally publish test to production or vice versa. If we could check in the build configuration selection with the publish profile we would not have this issue. Does anyone know if Microsoft plans on changing this in the future?
Link build configuration to a publish profile
CC BY-SA 2.5
0
2011-03-23T19:04:14.837
2012-09-13T14:06:46.460
null
null
27,852
[ "visual-studio-2010" ]
5,410,358
1
5,410,449
null
1
2,081
I know this has been asked before, but I can't seem to get it to work correctly. I am trying to vertically align a button and a link in a div. Both the button and the link should be on the same line centered vertically with each other. It works in FireFox but not in IE7 or IE8. Html: ``` <div class="submitform"> <input type="submit" value="Initiate Request" /> <a href="/test2">Cancel</a> </div> ``` Css: ``` .submitform a { padding-left: 10px; } .submitform { width: 600px; vertical-align: middle; padding-top: 15px; height: 30px; } ``` This is what it looks like in IE7 and 8: ![enter image description here](https://i.stack.imgur.com/yYiiw.png) Note that the Cancel link is not vertically aligned in the middle with the button. It is aligned correctly in FireFox. This is how I want it to look: ![enter image description here](https://i.stack.imgur.com/vgOqM.png) Here are the inherited styles: ![enter image description here](https://i.stack.imgur.com/XPBit.png) How can I fix the alignment? Thanks!
Aligning button and link in a div, broken in IE, works in FF
CC BY-SA 2.5
null
2011-03-23T19:10:02.760
2011-03-23T22:12:10.387
2011-03-23T19:29:50.520
131,818
131,818
[ "html", "css", "internet-explorer-8", "internet-explorer-7" ]
5,410,416
1
5,781,676
null
1
975
I'm running Firefox 4 on Windows 7 with a DPI setting of 144 dpi. I have a web page with a 3rd party datepicker that has a select boxes for the Month and Year fields. The problem is that Firefox will not render the up/down arrows, so the user cannot select a date. I have taken the month select box out of the datepicker and isolated the problem. In the screenshot below, Firefox (left) does not show up/down arrows for size:2 and size:3. IE (right) shows them correctly. ![screenshot of Firefox vs IE showing DPI problem](https://i.stack.imgur.com/2KBhn.png) HTML code for the select box with size:2: `<select size="2"><option>January</option><option>February</option><option>March</option><option>April</option><option>May</option><option>June</option><option>July</option><option>August</option><option>September</option><option>October</option><option>November</option><option>December</option></select>` I could modify the datepicker to use a different size (1 or 4) or use a lower DPI, but it may not be an option for some of my users. Any ideas ... if not a fix, then a cause...?
High DPI setting causes Firefox to not render scrollbar arrows in Select box
CC BY-SA 3.0
null
2011-03-23T19:17:06.730
2011-04-25T18:27:38.333
2011-04-17T15:22:30.667
171,676
171,676
[ "html", "internet-explorer", "firefox", "browser", "dpi" ]
5,410,481
1
5,410,539
null
0
336
How do I get precise sizing on different platforms, if each platform renders text at a different size? This issue was exacerbated with the recent release of [Firefox 4](http://www.mozilla.com/en-US/firefox/fx/). This version enables hardware rendering of text using [DirectWrite](http://en.wikipedia.org/wiki/DirectWrite). The size of the text written with DirectWrite is much taller than text written with no hardware acceleration. Note the following example. Here's the [live example](http://www.veetle.com/index.php/broadcast/beta) if you need to see the CSS. ![directwrite off](https://i.stack.imgur.com/SoFUZ.png) - - - - ![directwrite on](https://i.stack.imgur.com/6fv9s.png) - - - - HTML ``` <ul> <li><a>Nav</a></li> <li><a>Nav</a></li> <li><a>Nav</a></li> </ul> <div> Content </div> ``` CSS ``` ul { float: left; width: 10em; } div { margin: 0 0 0 12.7em; min-height: 26.1em; } ``` Do you see how the navigation lines up with the content when DirectWrite is off, but the navigation is taller than the content when DirectWrite is on? I know there are some hacky solutions. One is to specify everything (`font-size, width, height`) in px. This is not ideal because the component will not be modular - that is, it can't be re-used in another setting scaled to another size. It also breaks IE6's font size options. Another solution is to use JavaScript to read the physical height of the navigation and make the content the same height. This is not ideal because it is CSS's role to style. Is there any CSS solution for this? This is just one of many examples. Another is Firefox 3 on Ubuntu 9 has much wider text, so not all links fit in my primary navigation. I was forced to chop off the last navigation link with `max-width: 37em; overflow: hidden`.
Text is different size on different platforms
CC BY-SA 2.5
null
2011-03-23T19:22:01.240
2011-03-23T21:36:26.217
null
null
459,987
[ "css", "fonts", "firefox4", "directwrite" ]
5,410,632
1
null
null
0
646
In my app, I'm creating a full-screen view and then shrinking it down (to about 1/10th of its original size) so that I can later animate it to full-size. The problem is that the view looks terrible at that size, and is highly pixellated. Here's the full-size view: ![enter image description here](https://i.stack.imgur.com/8uITo.png) And here's the shrunken view in-place: ![enter image description here](https://i.stack.imgur.com/jGMe4.png) I'm shrinking the view using `setFrame:` - is there some way to tell iOS to use high-quality interpolation? Or am I already getting the highest-quality interpolation and this is the best it can do?
How to resize (shrink) a UIView without pixellation?
CC BY-SA 2.5
null
2011-03-23T19:34:22.903
2011-03-23T19:40:42.390
null
null
14,606
[ "iphone", "ios", "ipad" ]
5,410,708
1
5,410,773
null
0
213
![Print Order Form](https://i.stack.imgur.com/miOOI.png) I am looking to set up this order form on my website for ordering Printing Packages. All its required to do is add up the total price for the customer and send the order in an email to our Printer. No invoicing or checkout required. What would be the best way to approach this to avoid complexity? Javascript? Or is there another language/tools that would be better suited? The website is written in php.
The Best Way To Code An Order Form
CC BY-SA 2.5
null
2011-03-23T19:41:08.273
2011-03-23T19:48:14.643
null
null
372,237
[ "php", "javascript" ]
5,410,939
1
null
null
4
514
This is probably futile, but I'm wondering if anyone out there has experience doing this. I'm trying to access a application hosted within by using (e.g., ). The problem I'm having is that Chrome hosts the Silverlight app within a child process. If I attempt to find the AutomationElement (by using the main process' hWnd), it fails. If I locate the Silverlight host child process, it does not have a window handle, and if I attempt to find the control using the child process' Handle it fails. I know it's there... I can see it using [Inspect](http://msdn.microsoft.com/en-us/library/dd318521%28v=vs.85%29.aspx) ![Jerkface](https://i.stack.imgur.com/iYfcg.png) but I can only find this by in the Silverlight app and navigating up in Inspect. I cannot navigate down from the tab window using AutomationElement.FindFirst or Inspect. Its like there is a disconnect between the window and the Silverlight plugin that isn't seen in IE or Firefox, and I don't know how to get around it. Has anybody else been able to do this?
Access Silverlight window within Chrome via System.Windows.Automation
CC BY-SA 2.5
0
2011-03-23T20:02:26.093
2011-10-17T05:47:32.340
null
null
null
[ "silverlight", "google-chrome", "ui-automation", "automationelement" ]
5,411,002
1
null
null
3
1,180
If I create an out-of-the-box ASP.NET MVC 3 Web Application (non-empty, Razor, no unit tests) and deploy it to an IIS 7.5 site (.NET 4, Integrated Pipeline), every controller action I trigger causes a ton of "name not found" and "path not found" errors in procmon. The w3wp.exe process is trying to visit file system locations that the MVC Routing engine should pick up and handle. This is a small portion of the procmon log after clicking the "LogOn" link one time only: ![Process Monitor Output](https://i.stack.imgur.com/9pzpD.png) Is this expected behavior? It doesn't feel right to me. I came across this because my server CPU utilization was pegged at 100%. One of my calls was happening frequently enough (causing the "path not found" error) that it was eating up CPU. (~85 concurrent users on the site in both cases).
Should .NET MVC 3 actions trigger w3wp.exe to generate Process Monitor "PATH NOT FOUND" and "NAME NOT FOUND" errors?
CC BY-SA 2.5
null
2011-03-23T20:08:22.960
2021-04-16T14:54:21.220
2011-03-25T15:07:03.643
141,689
141,689
[ "asp.net-mvc", "iis", "asp.net-mvc-3", "process", "iis-7.5" ]
5,411,734
1
5,423,341
null
0
383
I am trying to get the MSpec plugin to work with [ReSharper](http://en.wikipedia.org/wiki/ReSharper) 5.1 running Visual Studio Premium 2010. I have followed the install procedure and copied the `Machine.Specification.dll` and `Machine.Specifications.ReSharperRunner.5.1.dll` and the associated PDB files to the ReSharper plugins folder. When Visual Studio starts I get this error message: ![Machine.Specification could not be loaded](https://i.stack.imgur.com/DWXhx.png) How do I resolve this? All the required DLL files are there. The DLL files are not on a network location.
DLL issue with MSpec ReSharper plugin
CC BY-SA 2.5
null
2011-03-23T21:16:47.123
2011-04-06T23:07:24.513
2011-04-06T23:07:24.513
63,550
230
[ ".net", "visual-studio-2010", "resharper", "mspec" ]
5,411,796
1
5,411,824
null
16
13,561
I am trying to make a simple illustration where a circle is plotted inside a square. I have used the `rect()` function from the `grid` package and the `draw.circle()` function from the `plotrix` package before so I thought this would be simple. But clearly I am missing something. The following code seems to me like it should work: ``` require(plotrix) require(grid) plot(c(-1, 1), c(-1,1), type = "n") rect( -.5, -.5, .5, .5) draw.circle( 0, 0, .5 ) ``` however I end up with the circle lapping out of the square in the vertical dimension like this: ![enter image description here](https://i.stack.imgur.com/mRomT.png) What in the heck am I missing? If you have a simpler way of plotting circles and squares, I'd love to know about it. But I'd also like to know why my method above does not work. Thanks!
plotting a circle inside a square in R
CC BY-SA 2.5
0
2011-03-23T21:22:10.693
2019-02-13T14:32:42.310
null
null
37,751
[ "r", "plot" ]
5,412,207
1
5,412,322
null
5
886
So I have a matrix of values were the rows correspond to sets of data, and I want to plot each of these using ListPlot but I want to have a different x-axis than the index. In matlab I would have: ``` x = 0:4; ys = [10 20 40 80 160; 20 40 80 160 320; 30 60 120 240 480]'; plot(x,ys) ``` and this would give three lines with x-values 0-4 and the y-values being each column. The closest I could come up with in Mathematica is ``` x = Range[0,4]; ys = {{10, 20, 40, 80, 160}, {20, 40, 80, 160, 320}, {30, 60, 120, 240, 480}}; ListPlot[Transpose[{x,#}]& /@ ys] ``` ![Mathematica graphics](https://i.stack.imgur.com/R1Ezz.png) Is this the correct way? It seems a bit cryptic. Hoping there is a function or option I am missing.
matlab like multiline plot in Mathematica
CC BY-SA 3.0
null
2011-03-23T22:06:04.730
2012-01-03T22:01:58.300
2012-01-03T22:01:58.300
615,464
648,968
[ "wolfram-mathematica", "plot" ]
5,412,611
1
5,412,703
null
0
299
I have recently upgraded one of our systems from Code Igniter 1.7.2 to 2.0.1. Do do this you are required to replaced the directory with a newer version. The old CI system was under version control, including the directory. When I go to commit I get ![Please execute the cleanup command](https://i.stack.imgur.com/N6lqL.png) So I go to execute the cleanup command and I get ![system is not a working copy directory](https://i.stack.imgur.com/FuIBC.png) How can I fix this?
deleted folder under svn control, replaced with folder of same name with different content, now svn wont work!
CC BY-SA 2.5
null
2011-03-23T22:45:30.307
2011-03-23T22:55:41.707
null
null
383,759
[ "windows", "svn", "tortoisesvn" ]
5,412,638
1
5,412,775
null
1
1,250
I have a `Gridview` like this. ``` <asp:GridView ID="GridView1" runat="server" Width="16px" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal" Height="16px" > <AlternatingRowStyle BackColor="#F7F7F7" /> <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" /> <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" /> <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" /> <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" /> <sortedascendingcellstyle backcolor="#F4F4FD" /> <sortedascendingheaderstyle backcolor="#5A4C9D" /> <sorteddescendingcellstyle backcolor="#D8D8F0" /> <sorteddescendingheaderstyle backcolor="#3E3277" /> <SortedAscendingCellStyle BackColor="#F4F4FD"></SortedAscendingCellStyle> <SortedAscendingHeaderStyle BackColor="#5A4C9D"></SortedAscendingHeaderStyle> <SortedDescendingCellStyle BackColor="#D8D8F0"></SortedDescendingCellStyle> <SortedDescendingHeaderStyle BackColor="#3E3277"></SortedDescendingHeaderStyle> </asp:GridView> ``` Programaticly, i adding a data source this `Gridview`. ``` protected void SendToGridview_Click(object sender, EventArgs e) { Calculate.Visible = true; MV_Label.Visible = true; RISK_Label.Visible = true; string strQuery; string ConnectionString = ConfigurationManager.ConnectionStrings["ora"].ConnectionString; OracleConnection myConnection = new OracleConnection(ConnectionString); strQuery = @"SELECT A.HESAP_NO, A.TEKLIF_NO1 || '/' || A.TEKLIF_NO2 AS TEKLIF, A.MUS_K_ISIM AS MUSTERI, B.MARKA, C.SASI_NO, C.SASI_DURUM, D.TAS_MAR, NVL(RISK_SASI(A.TEKLIF_NO1, A.TEKLIF_NO2, C.URUN_SIRA_NO, C.SIRA_NO),0) AS RISK, NVL(MV_SASI(A.TEKLIF_NO1, A.TEKLIF_NO2, C.SIRA_NO, C.URUN_SIRA_NO, SYSDATE),0) AS MV FROM S_TEKLIF A, S_URUN B, S_URUN_DETAY C, KOC_KTMAR_PR D WHERE A.TEKLIF_NO1 || A.TEKLIF_NO2 = B.TEKLIF_NO1 || B.TEKLIF_NO2 AND A.TEKLIF_NO1 || A.TEKLIF_NO2 = C.TEKLIF_NO1 || C.TEKLIF_NO2 AND B.SIRA_NO = C.URUN_SIRA_NO AND B.DISTRIBUTOR = D.DIST_KOD AND B.MARKA = D.MARKA_KOD AND B.URUN_KOD = D.TAS_KOD "; string param = ""; foreach (ListItem l in CheckBoxList1.Items) { if (l.Selected) { param += string.Format("'{0}'", l.Value); param += ","; } } param = param.Remove(param.Length - 1); strQuery = strQuery + " AND A.HESAP_NO IN (" + param + ")"; OracleCommand myCommand = new OracleCommand(strQuery, myConnection); myCommand.CommandType = System.Data.CommandType.Text; myCommand.Connection = myConnection; myCommand.CommandText = strQuery; myConnection.Open(); OracleDataReader dr = myCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection); GridView1.DataSource = dr; GridView1.DataBind(); GridView1.Visible = true; myConnection.Close(); } ``` This is my Gridview looks; ![enter image description here](https://i.stack.imgur.com/5MHvr.png) What i want is, i want to add checkboxes column after `RISK` column and `MV` column. I mean, columns looks like, , , , , , , , , , , . Totaly should be column. And i want all checkboxes is checked as a default. How can i do that? I read [this](http://www.asp.net/data-access/tutorials/adding-a-gridview-column-of-checkboxes-cs) article, but in this article Gridview a normal data source. I adding programaticly.
Adding All Rows Checkbox for Unknown Gridview Data Source
CC BY-SA 2.5
null
2011-03-23T22:48:08.793
2012-05-09T17:52:22.650
null
null
447,156
[ "c#", ".net", "asp.net", "database", "gridview" ]
5,412,970
1
5,413,669
null
12
9,140
Is it possible to zoom into a region and display it as a subplot within the same plot? Here is my primitive attempt at freehand graphics, to illustrate my question: ![enter image description here](https://i.stack.imgur.com/NHHxd.png) I can think of using `Plot`, and then `Epilog`, but then I get lost in the positioning and in giving the plot its own origin (When I try `Epilog` on `Plot`, the new plot lays on top of the old one, using the old one's origin). Also, it would be nice if the positioning of the subplot can be input, as different curves have different "empty regions" that can be used to position the image. I've seen this in several articles and I can do this in MATLAB, but I have no clue how to do it in mma.
Zoom region and display as a subplot within plot
CC BY-SA 2.5
0
2011-03-23T23:31:21.113
2012-01-03T21:59:51.420
null
null
null
[ "wolfram-mathematica" ]
5,412,975
1
5,418,305
null
0
5,004
I am using the likebox. I am getting some strange results. On Google chrome: Says 7 likes, Shows 6 people, 7th person is the last "liker" repeated another time. On Internet Explorer Says 6 likes, shows 4 people. On Firefox Says 6 likes, shows 4 people. Live example: [See the fan box on the right](http://jquery.webspirited.com/) What is causing this? How can I fix it? What is causing this? ![enter image description here](https://i.stack.imgur.com/tgaB1.png)
http://www.connect.facebook.com/widgets/fan.php repeating last "liker" twice?
CC BY-SA 2.5
null
2011-03-23T23:32:01.537
2011-03-24T11:22:02.223
2011-03-23T23:57:21.270
383,759
383,759
[ "facebook", "facebook-widgets" ]
5,413,088
1
5,416,711
null
0
201
I was testing glsl and shader wasn't doing what I want. I have this piece of code to retrieve logs (I'm using JOGL). ``` gl.glGetShaderInfoLog(vertexShader, INFO_LOG_SIZE, charsWritten, bb); ``` I get the string from within "bb" and find marvelous question marks. I debug and then I find this ![Chinese PWNING me](https://i.stack.imgur.com/zeuff.png) In my infinite knowledge of chinese google tells me: > Garrulous contravene several ⁳ radial Tangju Shuiceonliedao Aigeshexiong ⁣ Lake Yanjishuolang ⁲ Mu  Quraomangshui Fang As you can see this is very helpful to me :D Can I change the log language... or something? Thanks!
GLSL link info log in chinese
CC BY-SA 2.5
null
2011-03-23T23:50:16.293
2011-03-24T09:19:23.573
null
null
281,490
[ "java", "opengl", "logging", "glsl", "shader" ]
5,413,138
1
5,413,462
null
3
7,008
Please see the attached screenshot. When I mouse over the following code: ``` selenium.waitForPageToLoad("30000"); ``` I get this message: *void com.thoughtworks.selenium.Selenium.waitForPageToLoad(String arg0) Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.* F3 is giving me "". Does anyone know where to get this source (what is it called) and how do I attach to Eclipse? ![ttp://img853.imageshack.us/img853/8248/ecl.png](https://i.stack.imgur.com/T1JHw.png)
Source is missing in Eclipse for Selenium
CC BY-SA 3.0
0
2011-03-23T23:57:47.563
2013-02-10T08:50:22.563
2013-02-10T08:50:22.563
1,273,080
673,993
[ "java", "eclipse", "selenium", "selenium-rc" ]
5,413,234
1
5,418,542
null
0
519
I am using [Simple Facebook Connect](http://wordpress.org/extend/plugins/simple-facebook-connect/) for Worpress. However I am getting some javascript errors.![Javascript Errors](https://i.stack.imgur.com/afFIg.png) [View Image Full Size](https://i.stack.imgur.com/afFIg.png) > www.connect.facebook.com/widgets/fan.php?api_key=xxxx&channel_url=http%3A%2F%2Fjquery.webspirited.com%2F%3Fxd_receiver%3D1&id=189373481094312&name=&width=285&connections=10&stream=0&logobar=1&css= GET (same url as above) undefined (undefined) UnsafeJavaScript attempt to access frame with URL [http://jquery.webspirited.com/](http://jquery.webspirited.com/) from frame with URL [http://www.facebook.com/extern/login_status.php?api_key=xxxx&extern=2&channel=http%3A%2F%2Fjquery.webspirited.com%2F%3Fxd_receiver%3D1&locale=en_US](http://www.facebook.com/extern/login_status.php?api_key=xxxx&extern=2&channel=http%3A%2F%2Fjquery.webspirited.com%2F%3Fxd_receiver%3D1&locale=en_US). Domains, protocols and ports must match. How can I fix these errors?
Wordpress Simple facebook connect - Javascript errors
CC BY-SA 2.5
null
2011-03-24T00:13:53.780
2012-08-13T10:28:12.697
null
null
383,759
[ "javascript", "facebook", "wordpress" ]
5,413,364
1
5,413,603
null
0
327
``` <fieldset> <legend> <ul class="lavaLampWithImage"> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> </legend> </fieldset> ``` I want to make the above fieldset have the JQuery lavalamp plugin AS the legend of the fieldset, so it looks like the fieldset lines go through the plugin image, like a real legend would be, then I'm eventually going to color the fieldset to match it. ``` $(function () { $(".lavaLampWithImage").lavaLamp({ fx: "backout", speed: 700 }) }); ``` This is the code I use to create the lavalamp menu. Here is how it comes out: ![enter image description here](https://i.stack.imgur.com/QlSwF.png) Is there anyway I can make it look right?
Make Jquery lavalamp the legend of a fieldset
CC BY-SA 2.5
null
2011-03-24T00:33:40.270
2011-03-24T01:12:10.520
null
null
285,856
[ "jquery", "html", "css" ]
5,413,647
1
5,413,772
null
4
1,835
I am using a notebook without a mouse. After typing `prop` and pressing `tab`, Visual Studio will automatically give me a property template. Pressing `tab` will move the cursor between `type` and `propertyname` placeholders. I want to move the cursor to a new line after completing the property template. Is there a shortcut to do so? ![enter image description here](https://i.stack.imgur.com/O5GCI.png)
Is there a shortcut to move the cursor as shown in the following figure?
CC BY-SA 2.5
null
2011-03-24T01:18:05.040
2012-11-21T12:53:11.433
null
null
596,314
[ "visual-studio", "visual-studio-2010" ]
5,413,673
1
null
null
0
202
There are other questions on SO about this but it's my first time and I'm failing to completely comprehend. QUESTION 1: Assuming this example is actually safe, i.e. the warning could be ignored: How would this code need to be changed so that the this warning warns about will be real? QUESTION 2: How is it that the fix applied for the warning makes the warning go away? My intuition tells me it is the same result. Here's the code: ``` public static void SynchCreativesForCampaign(int pid, ILogger logger) { var db = new SynchDbDataContext(true); foreach (var creativeItem in CreativeList.Create(pid).CreativeItems) { logger.Log(@"creative id " + creativeItem.CreativeId); var creativeDetail = CreativeDetail.Create(creativeItem.CreativeId); //var item = creativeItem; <-- this gets added by the "fix" for the warning var creativeEntity = (from c in db.CreativeEntities where c.dtid == creativeItem.CreativeId select c).FirstOrDefault(); if (creativeEntity == null) { creativeEntity = new CreativeEntity {dtid = item.CreativeId}; db.CreativeEntities.InsertOnSubmit(creativeEntity); } } db.SubmitChanges(); } ``` Here's the warning: ![enter image description here](https://i.stack.imgur.com/iTesS.png)
what is the counter example for this code generating a modified closure warning that would cause a problem?
CC BY-SA 2.5
0
2011-03-24T01:21:34.607
2011-03-24T01:43:25.643
null
null
398,546
[ "c#", "resharper", "warnings" ]
5,413,691
1
5,413,747
null
1
6,630
On Windows 7 I have installed the Java SE JDK, then rebooted. ![enter image description here](https://i.stack.imgur.com/H02Vu.png) When I then run the Android SDK installer, there is a warning that the JDK is not installed. ![enter image description here](https://i.stack.imgur.com/Kfm9d.png)
Android SDK deosn't think JDK is installed? - Windows 7
CC BY-SA 2.5
null
2011-03-24T01:24:38.583
2013-08-10T06:11:25.750
null
null
172,861
[ "android", "windows", "sdk", "java" ]
5,413,814
1
5,414,468
null
9
2,426
I'm trying to separate a greylevel image based on pixel-value: suppose pixels from 0 to 60 in one bin, 60-120 in another, 120-180 ... and so on til 255. The ranges are roughly equispaced in this case. However by using K-means clustering will it be possible to get more realistic measures of what my pixel value ranges should be? Trying to obtain similar pixels together and not waste bins where there is lower concentration of pixels present. EDITS (to include obtained results): ![enter image description here](https://i.stack.imgur.com/eJjvl.jpg) ![enter image description here](https://i.stack.imgur.com/lx93i.jpg) k-means with no of cluster = 5
Can K-means be used to help in pixel-value based separation of an image?
CC BY-SA 2.5
0
2011-03-24T01:43:10.370
2011-03-26T17:45:30.537
2011-03-26T15:12:17.630
353,410
297,353
[ "algorithm", "image", "image-processing", "opencv", "k-means" ]
5,413,858
1
5,413,903
null
0
62
I am working on some PHP classes that can do some basic profiling, debugging, and error handling. Yes I know about XDebug and it's great, but I would like to have some classes as well for my library to do some of this type of stuff. Below is a class I am working on that will show an error message when one occurs and will show me the line number it happened on as well as the source code for that line and the X amount of lines below and above the error line. Similar to in this image below... (may have to view image in new window/tab to see larger version) ![source code class](https://i.stack.imgur.com/wjREX.png) Here is my class code I have as of right now for this... ``` <?php class Debugger { public static function debug_source($file, $line_number, $padding = 5) { if (!$file or !is_readable($file)) { return false; } // Open the file and set the line position $file = fopen($file, 'r'); $line = 0; // Set the reading range $range = array('start' => $line_number - $padding, 'end' => $line_number + $padding); // Set the zero-padding amount for line numbers $format = '% ' . strlen($range['end']) . 'd'; $source = ''; while (($row = fgets($file)) !== false) { // Increment the line number if (++$line > $range['end']) break; if ($line >= $range['start']){ // Make the row safe for output $row = htmlspecialchars($row, ENT_NOQUOTES); // Trim whitespace and sanitize the row $row = '<span class="number">' . sprintf($format, $line) . '</span> ' . $row; if ($line === $line_number){ // Apply highlighting to this row $row = '<span class="line highlight">' . $row . '</span>'; } else{ $row = '<span class="line">' . $row . '</span>'; } // Add to the captured source $source .= $row; } } // Close the file fclose($file); echo '<div id="exception_error">'; echo ' <h1><span class="type"> Error [ 345 ]</span></h1>'; echo ' <div class="content">'; echo ' <p>Test error message on line number ' . $line_number. '</p>'; echo ' <p><pre class="source"><code>' . $source . '</code></pre></p>'; echo ' </div>'; echo '</div>'; } } // Testing the class above. $file = 'bitmask/bitmasktest.php'; $line_number = 82; $line_number_padding = 5; $debugger = new Debugger(); $debugger->debug_source($file, $line_number, $line_number_padding); ?> ``` So I am looking for ways to improve and add on to this. It is not complete yet, this is just a start. Should I declare all variables in a class like this at the top? For example in this class I access the properties like this , , . Should I declare them at the top (all properties) like... ``` <?php //public/private/protected public $this->file; private $this->$line_number; private $this->padding; // etc, etc, for every single property used in a class method // or should I access them how I currently do in // this class like $file, $line_number, etcc???? ?> ``` ?> To make the output look correct from my method above, it needs this CSS data below in the page, I know I should probably include a CSS file for it or add it to my other css files, but my goal is to have this class be self contained, so the class can be ran anywhere and have the correct output. Should I somehow have a method that outputs the CSS needed for this class or what are some good ideas to keep it self contained and still look the way I want it (like in the image)? ``` <style type="text/css"> #exception_error { background: #ddd; font-size: 1em; font-family:sans-serif; text-align: left; color: #333333; } #exception_error h1, #exception_error h2 { margin: 0; padding: 1em; font-size: 1em; font-weight: normal; background: #911911; color: #FFFFFF; } #exception_error h1 a, #exception_error h2 a { color: #FFFFFF; } #exception_error h2 { background: #666666; } #exception_error h3 { margin: 0; padding: 0.4em 0 0; font-size: 1em; font-weight: normal; } #exception_error p { margin: 0; padding: .4em; } #exception_error a { color: #1b323b; } #exception_error p { margin: 0; padding: 0.1em 0; } #exception_error pre.source { margin: 0 0 1em; padding: 0.4em; background: #fff; border: dotted 1px #b7c680; line-height: 1.2em; } #exception_error pre.source span.line { display: block; } #exception_error pre.source span.highlight { background: #f0eb96; } #exception_error pre.source span.line span.number { color: #666; } </style> <style type="text/css"> .linenum{ text-align:right; background:#FDECE1; border:1px solid #cc6666; padding:0px 1px 0px 1px; font-family:Courier New, Courier; float:left; width:17px; margin:3px 0px 30px 0px; } code {/* safari/konq hack */ font-family:Courier New, Courier; } .linetext{ width:700px; text-align:left; background:white; border:1px solid #cc6666; border-left:0px; padding:0px 1px 0px 8px; font-family:Courier New, Courier; float:left; margin:3px 0px 30px 0px; } br.clear { clear:both; } </style> ``` ---
Should method properties be declared and accessed with $this->var in PHP?
CC BY-SA 2.5
null
2011-03-24T01:47:23.967
2011-03-24T02:04:53.927
null
null
143,030
[ "php", "debugging", "error-handling" ]
5,414,130
1
5,416,812
null
13
25,995
Here's an overview of how my solution looks: ![enter image description here](https://i.stack.imgur.com/A8t45.jpg) Here's my PizzaSoftwareData class: ``` namespace PizzaSoftware.Data { public class PizzaSoftwareData : DbContext { public DbSet<Customer> Customers { get; set; } public DbSet<Order> Orders { get; set; } public DbSet<Product> Products { get; set; } public DbSet<User> Users { get; set; } } } ``` According to an example on Scott Guthrie's blog, you have to run this code at the beginning of the application in order to create/update the database schema. ``` Database.SetInitializer<PizzaSoftwareData>(new CreateDatabaseIfNotExists<PizzaSoftwareData>()); ``` I'm running that line of code from Program.cs in PizzaSoftware.UI. ``` namespace PizzaSoftware.UI { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Database.SetInitializer<PizzaSoftwareData>(new CreateDatabaseIfNotExists<PizzaSoftwareData>()); Application.Run(new LoginForm()); } } } ``` Can anyone tell me why the database isn't having the tables created? Here's the connection string in my App.config file: ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionStrings> <add name="PizzaSoftwareData" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=SaharaPizza;Integrated Security=True;Pooling=False" providerName="System.Data.Sql" /> </connectionStrings> </configuration> ```
Entity Framework code first, isn't creating the database
CC BY-SA 2.5
0
2011-03-24T02:34:24.760
2014-07-10T13:34:04.603
2011-03-24T08:59:51.317
413,501
null
[ "c#", "ef-code-first", "entity-framework-4.1" ]
5,414,138
1
5,414,449
null
1
844
I'm getting differences between the design in VS2010 and the layout when compiled. See the images bellow: ![enter image description here](https://i.stack.imgur.com/Uth2w.png) ![enter image description here](https://i.stack.imgur.com/m97Uv.png) I have read [this](https://stackoverflow.com/questions/4596436/wpf-design-time-vs-run-time-style-differences-with-triggers) and I don't seem to be able to pick anything out that will help me. Why does this happen? XAML: ``` <Window x:Class="iAdvert_Desktop.TemplateDesigner" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="622" Width="610" AllowsTransparency="False" Opacity="1" Background="White" ResizeMode="NoResize"> <Window.Resources> <ResourceDictionary Source="Pages/BaseStyle.xaml" /> </Window.Resources> <Grid> <Canvas Height="281" VirtualizingStackPanel.VirtualizationMode="Standard" HorizontalAlignment="Left" Name="canvas1" VerticalAlignment="Top" Width="500" Background="#FF383838" PreviewMouseLeftButtonDown="canvas1_PreviewMouseLeftButtonDown" PreviewMouseMove="canvas1_PreviewMouseMove" PreviewMouseLeftButtonUp="canvas1_PreviewMouseLeftButtonUp" Margin="45,30,0,0" Panel.ZIndex="5"></Canvas> <DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserResizeColumns="False" CanUserResizeRows="False" DataContext="{Binding}" HeadersVisibility="Column" Height="143" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" HorizontalGridLinesBrush="#ccc" Margin="45,356,0,0" Name="dataGrid1" VerticalAlignment="Top" VerticalGridLinesBrush="#ccc" VirtualizingStackPanel.VirtualizationMode="Standard" Background="#FFF6F6F6" Width="500"> <DataGrid.Resources> <ResourceDictionary Source="Pages/DataGridStyle.xaml" /> </DataGrid.Resources> <DataGrid.Columns> <DataGridTemplateColumn Header="Delete"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ContentControl HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"> <Image Source="/iAdvert-Desktop;component/Images/icons/delete.png" Height="12" MouseLeftButtonUp="Image_MouseLeftButtonUp"></Image> </ContentControl> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTextColumn ElementStyle="{StaticResource CenterTextCell}" Width="0.5*" Binding="{Binding Path=TemplateCellID}" Header="ID"></DataGridTextColumn> <DataGridTextColumn ElementStyle="{StaticResource CenterTextCell}" Width="1*" Binding="{Binding Path=CellWidth}" Header="Width"></DataGridTextColumn> <DataGridTextColumn ElementStyle="{StaticResource CenterTextCell}" Width="1*" Binding="{Binding Path=CellHeight}" Header="Height"></DataGridTextColumn> <DataGridTextColumn ElementStyle="{StaticResource CenterTextCell}" Width="1*" Binding="{Binding Path=CellTop}" Header="Top"></DataGridTextColumn> <DataGridTextColumn ElementStyle="{StaticResource CenterTextCell}" Width="1*" Binding="{Binding Path=CellLeft}" Header="Left"></DataGridTextColumn> </DataGrid.Columns> </DataGrid> <Button Content="Add Cell" Height="23" Name="button1" Width="75" Click="button1_Click" Margin="470,317,43,243" /> <TextBox Style="{StaticResource TextBoxStyle}" Height="26" HorizontalAlignment="Right" Margin="0,504,271,0" Name="textBox1" VerticalAlignment="Top" Width="178" /> <TextBlock Style="{StaticResource TextDescription}" Height="26" HorizontalAlignment="Left" Margin="45,504,0,0" Name="textBlock1" Text="Template Name" VerticalAlignment="Top" /> <Button Content="Save Template" Height="23" HorizontalAlignment="Left" Margin="450,505,0,0" Name="button2" VerticalAlignment="Top" Width="95" Click="button2_Click" /> </Grid> </Window> ``` BaseStyle: ``` <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style x:Key="TextHeader" TargetType="TextBlock"> <Setter Property="Background" Value="#FF333333" /> <Setter Property="FontWeight" Value="Bold" /> <Setter Property="Padding" Value="5" /> <Setter Property="Foreground" Value="White" /> <Setter Property="FontSize" Value="16" /> </Style> <Style x:Key="TextDescription" TargetType="TextBlock"> <Setter Property="Background" Value="#FF333333" /> <Setter Property="Padding" Value="5" /> <Setter Property="Foreground" Value="White" /> </Style> <Style x:Key="ButtonStyle" TargetType="Button"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="#FF333333" /> <Setter Property="Foreground" Value="White" /> <Setter Property="BorderBrush" Value="{x:Null}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Padding" Value="5" /> </Trigger> </Style.Triggers> <Setter Property="Background" Value="#FF333333" /> <Setter Property="Foreground" Value="White" /> <Setter Property="BorderBrush" Value="#FF333333" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Padding" Value="5" /> </Style> <Style x:Key="TextBoxStyle" TargetType="TextBox"> <Setter Property="BorderBrush" Value="#FF333333" /> <Setter Property="Height" Value="26" /> </Style> </ResourceDictionary> ``` DataGridStyle: ``` <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style TargetType="{x:Type DataGrid}"> <Setter Property="ItemsControl.AlternationCount" Value="2" /> <Setter Property="BorderBrush" Value="#FF333333" /> </Style> <Style TargetType="{x:Type DataGridColumnHeader}"> <Setter Property="Control.Foreground" Value="White" /> <Setter Property="Control.Background" Value="#333" /> <Setter Property="Control.Padding" Value="5" /> </Style> <Style TargetType="{x:Type DataGridRow}"> <Style.Triggers> <Trigger Property="ItemsControl.AlternationIndex" Value="1"> <Setter Property="Control.Background" Value="#f1f1f1" /> </Trigger> <Trigger Property="ItemsControl.AlternationIndex" Value="0"> <Setter Property="Control.Background" Value="#f9f9f9" /> </Trigger> <Trigger Property="DataGridRow.IsSelected" Value="True"> <Setter Property="Control.Background" Value="#ccc" /> </Trigger> </Style.Triggers> </Style> <Style TargetType="{x:Type DataGridCell}"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type DataGridCell}"> <Grid> <ContentPresenter VerticalAlignment="Center" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="FrameworkElement.Height" Value="20" /> </Style> <Style x:Key="CenterCell" TargetType="{x:Type DataGridCell}"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type DataGridCell}"> <Grid> <ContentPresenter HorizontalAlignment="Center" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="CenterTextCell" TargetType="{x:Type TextBlock}"> <Setter Property="TextAlignment" Value="Center" /> </Style> </ResourceDictionary> ```
WPF Design Layout vs Compiled Layout
CC BY-SA 2.5
0
2011-03-24T02:36:15.100
2011-03-24T03:32:41.040
2017-05-23T12:30:37.427
-1
475,125
[ "c#", "wpf", "visual-studio-2010", ".net-4.0" ]
5,414,631
1
5,422,104
null
18
6,436
Trying to understand why am I getting low quality drawing with CGContextShowTextAtPoint? See attached image: ![img](https://i.stack.imgur.com/Bc3HH.png) The letter "W" is drawn using CGContextShowTextAtPoint on a CALayer and looks very pixelized. The button next to it is a standard button and looks high res as expected. I would like to get the text drawing to be hi-res. ![enter image description here](https://i.stack.imgur.com/E82IL.png)
Retina display core graphics font quality
CC BY-SA 2.5
0
2011-03-24T04:05:24.693
2016-01-01T15:04:44.327
2011-03-25T04:38:06.360
573,047
573,047
[ "iphone", "ios", "core-animation", "core-graphics", "calayer" ]
5,414,639
1
5,430,111
null
45
56,682
I'm trying to render some text using PIL, but the result that comes out is, frankly, crap. For example, here's some text I wrote in Photoshop: ![PhotoShop](https://i.stack.imgur.com/gjHrN.png) and what comes out of PIL: ![PIL](https://cl.ly/3x0W2B1P2k1f2W343u28/Screen_shot_2011-03-23_at_11.49.37_PM.png) As you can see, the results from PIL is less than satisfactory. Maybe I'm just being picky, but is there any way to draw text using PIL that gets results more close to my reference image? Here's the code I'm using on Python 2.7 with PIL 1.1.7 ``` image = Image.new("RGBA", (288,432), (255,255,255)) usr_font = ImageFont.truetype("resources/HelveticaNeueLight.ttf", 25) d_usr = ImageDraw.Draw(image) d_usr = d_usr.text((105,280), "Travis L.",(0,0,0), font=usr_font) ```
Python Imaging Library - Text rendering
CC BY-SA 3.0
0
2011-03-24T04:07:02.207
2020-07-09T10:49:08.790
2017-02-08T14:31:50.113
-1
667,713
[ "python", "python-imaging-library", "imaging" ]
5,414,712
1
5,414,845
null
7
4,285
I can never seem to get text to rotate correctly inside a plot, whereas the same text rotates perfectly otherwise. For example, ``` Plot[Sin[x], {x, -2 Pi, 2 Pi}, Epilog -> First@Graphics[Rotate[Text["Sine", {Pi, 1/2}], -30 Degree]]] ``` gives the following. ![enter image description here](https://i.stack.imgur.com/6Kf2m.png) The text is skewed and hardly legible. How do I rotate the text correctly?
How do I get text to rotate correctly?
CC BY-SA 2.5
0
2011-03-24T04:19:58.467
2012-01-03T21:58:09.783
2020-06-20T09:12:55.060
-1
null
[ "wolfram-mathematica" ]
5,414,730
1
null
null
87
27,697
I'm trying to use a font which I got from the Adobe Font Collection Pro Package. Unfortunately, it seems to draw incorrectly when I use it within a `UILabel`. The line height seems to be calculated correctly (I think), but when the font is displayed, it is aligned to the very top of the bounding box. I called `[myLabel sizeToFit]` and only adjusted the width to produce this screen capture: ![Screen capture of incorrect font rendering](https://i.stack.imgur.com/HClEg.png) I had the same problem with both the bold and regular version of the font. I was able to pull a version of from OSX and put it on my device and it displays fine (green background in above picture). What could be wrong with the either the font file or my code that would cause it to draw this way?
Custom installed font not displayed correctly in UILabel
CC BY-SA 3.0
0
2011-03-24T04:22:59.747
2020-02-27T13:42:59.367
2011-11-29T16:59:08.383
758,118
453,180
[ "ios", "ios4", "fonts", "uilabel", "uifont" ]
5,414,910
1
null
null
0
231
While developing I am adding databases with each major addition. My latest is an image gallery program, I'm asking myself all these questions/ A simplified version of possible tables ``` Image (id, name, path, state) Gallery (id, name, path, state) Image Gallery Relationship (image id, gallery id) Image User Relationship (image id, user id) Image Venue Relationship (image id, venue id) Image Event Relationship (image id, event id) Gallery User Relationship (image id, user id) Gallery Venue Relationship (image id, venue id) Gallery Event Relationship (image id, event id) ``` I'm thinking the same photo can be owned/taken by a user, assigned to an event and to a venue, in a gallery from the users photos, in a gallery related to the event, in a gallery related to the venue. Now if I want to use the same database to store the profile picture of a user, would I create another table for that? Should I put the profile picture id into the user table? Should I put the photo ownership into the Image table? But most likely a major part of the pictures won't be uploaded by users. What about the "profile picture" for a an Event or venue? Or the cover picture of a a gallery? Am I creating to many tables or not enough? Generally when creating columns I think if it is a required, single value attribute then place it in the table, If it could be null or associated with multiple things it should probably be in another table. But I'm at 60 tables now and I'm not even half way through my program. These day's I'm really lacking a mentor, so all advice is greatly appreciated Pic related, it's my current database ![my current database](https://i.stack.imgur.com/lnQfV.png) If my question can be more generalized to help future people with similar questions I don't mind edits
Am I going overboard with MySql tables?
CC BY-SA 2.5
0
2011-03-24T04:51:13.017
2011-03-24T05:33:56.397
2011-03-24T05:14:49.303
81,785
81,785
[ "mysql", "database-design", "relationships" ]
5,414,917
1
null
null
1
176
``` int main (int argc, char * const argv[]) { int *num = new int[100] ; return 0; } ``` In the above program, there are defintely . But when , gives the following figure which shows no leaked objects. What am I missing? Do the performance tool work only for environment ? ![Image](https://i.stack.imgur.com/Wef2X.png) On an MSVC++ 2010, it is easy to detect leaks while running on an debug mode - ``` #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> int main (int argc, char * const argv[]) { int *num = new int[100] ; _CrtDumpMemoryLeaks(); // Looking for something equivalent to this // that lets me know whether the program has // memory leaks on an XCode environment. return 0; } ```
C++ Program with Perfomance Tool - Leaks
CC BY-SA 2.5
null
2011-03-24T04:51:37.477
2012-06-24T22:41:30.840
2012-06-24T22:41:30.840
918,414
528,724
[ "c++", "performance", "memory-leaks", "xcode3.2" ]
5,415,018
1
5,417,443
null
3
5,010
I keep getting the following error message when i try to save a poco entity, using Entity Framework as the OR/M :- > > Entities in 'SqlServerContext.Foos' participate in the 'FK_Foos_Bahs' relationship. 0 related 'Bah' were found. 1 'Bah' is expected. Ok - the error message makes sense -- but that is NOT what I modeled :( (or am trying to model). It's saying that if I wish to save a `Foo`, then I need 1 instance of a `Bah`. A `Foo` can exist without a `Bah`. The relationship should be `1 <-> 0-or-1` .. not `1 <-> 1`. Here's the model in EF ... ![enter image description here](https://i.stack.imgur.com/md32N.png) ![enter image description here](https://i.stack.imgur.com/MO3sY.png) ![enter image description here](https://i.stack.imgur.com/oCmRX.png) Can anyone see what I've done wrong?
Not sure how to fix this weird Entity Framework (relationship/navigation) error
CC BY-SA 2.5
0
2011-03-24T05:07:21.480
2011-03-24T10:01:02.757
null
null
30,674
[ "c#", ".net", "asp.net", "entity-framework-4" ]
5,415,027
1
5,415,092
null
0
8,060
I had Visual Studio 2008 Professional Edition installed in my computer. When i installed this VS 2008 version, SQL Server 2005 was also automatically installed. I just had to install SQL Management Studio Because i want to install SQL Server 2008. I un-installed SQL Server 2005 and tried to install SQL Server 2008. But in the "Installation Rules" section in the installing setup, it prompts a message saying "Previous Release of VS 2008 Failed" () When I google it, i came to [Microsoft Support](http://support.microsoft.com/kb/956139) where they say the VS Version i have must be Service Pack 1 and must be a release version (not beta version). Now I'm confused with it. 1. What should I do? 2. How do I find the Service Pack Version of VS 2008 3. How do I find if the version is a release or a beta one 4. I recently installed VS 2010 C# Express and Web Developer 2010 Express. Without going to SQL Server 2008 can I work with VS 2010 with SQL Server 2005? ![enter image description here](https://i.stack.imgur.com/LEm46.png)
Cannot install SQL Server 2008 : Previous release of VS 2008 error
CC BY-SA 2.5
null
2011-03-24T05:08:35.653
2011-05-29T21:43:30.590
null
null
340,046
[ "sql", "visual-studio-2008", "sql-server-2008", "visual-studio-2008-sp1" ]
5,415,033
1
7,027,096
null
1
724
I am trying to use DataContractSerialization on WPF and WP7. All things are good on WPF but not on WP7. When I tryed to serialize an object on wp7, I received an unknown security exception. Please view the attached source code and help me. ![Capture](https://i.stack.imgur.com/vLKvx.png) [Source code (mediafire)](http://www.mediafire.com/?gamybdgotp02mne) Thanks.
DataContract serialization throw an Security exception
CC BY-SA 2.5
null
2011-03-24T05:09:41.810
2011-08-11T13:52:54.130
null
null
523,325
[ "serialization", "windows-phone-7", "datacontractserializer", "securityexception" ]
5,415,081
1
5,415,177
null
2
481
![Grid view display](https://i.stack.imgur.com/o3F3u.jpg) HI All, I am working on grid view in C# ASP.net VS2010. In the grid view I have added check box list. If i select a check box then a part of row should be selected and should get highlighted. Please refer to uploaded image. In this grid there are 3 rows: Groom, Clean n Pickup. Now if I select "Clean" then partial row of it should get selected (In image, Yellow color). Your any kind of guidline will be helpful. Thanks, Tanuja
Grid view selection
CC BY-SA 2.5
0
2011-03-24T05:19:01.940
2011-03-24T05:33:21.407
null
null
391,425
[ "c#", "asp.net", "visual-studio-2010", "gridview" ]
5,415,186
1
null
null
2
1,194
I have a file that I need to read into a buffer (char *) but the problem is that the file has some "funny characters" in it inbetween the valid text. ![enter image description here](https://i.stack.imgur.com/J5Od1.png) So when I write some code like the following: ``` FILE *fp; if((fp = fopen(".\\test.txt", "rt"))==NULL){ printf("Cannot open file2\n"); } fseek(fp, 0, SEEK_END); long int fsize = ftell(fp); rewind(fp); //char *buffer2 = malloc(fsize * sizeof(char)); buffer = malloc(fsize * sizeof(char)); fread(buffer, 1, fsize, fp); buffer[fsize] = '\0'; fclose(fp); printf("fsize = %i\n", fsize); printf("Buffer = %s\n", buffer); ``` It only prints out the first part of the text file like follows: Buffer = header And obviously stops at the first NUL char. Is thier any way to read the entire buffer of the file, including funny chars? Or is this not possible in C? The FSIZE is read correctly, just the FREAD does not read the entire buffer ;-( Any help would be greatly appreciated ;-) Thanks Lynton UPDATE: OK, I was being a little stupid.....if I write the buffer to a file it has everything in it, only if I write it out to the screen does it stop at the null so that is fine.
How to read all contents of file, including NUL chars between valid text?
CC BY-SA 2.5
0
2011-03-24T05:34:43.483
2021-04-08T23:20:12.790
2011-03-24T06:18:14.867
440,844
440,844
[ "c" ]
5,415,203
1
5,415,227
null
0
440
This question may look stupid and dumb but I needed to ask this. I installed SQL server 2008 but what I have finally installed is this (see the images). Is SQL Server 2008 is installed? If not how can I install it? ![enter image description here](https://i.stack.imgur.com/mMYuN.png) ![enter image description here](https://i.stack.imgur.com/l3XKZ.png)
SQL Server 2008 Installation Incomplete
CC BY-SA 2.5
null
2011-03-24T05:37:10.173
2011-03-24T05:56:13.663
null
null
340,046
[ "sql-server-2008" ]
5,415,254
1
null
null
0
273
I develop a application and submit it on iTunes. and i also did localization for this application for German language. but in German market it showing Language : English. but i want to show both language English and German. like attach sample is showing : ![Sample image](https://i.stack.imgur.com/BQERQ.png) Thx Mitesh
multiple application language in iTunes
CC BY-SA 2.5
null
2011-03-24T05:45:23.530
2011-03-24T06:31:54.527
null
null
397,636
[ "ios4", "app-store", "itunes", "app-store-connect", "itunes-store" ]
5,415,283
1
5,423,913
null
0
289
I am using Glassfish V3 which comes with netbeans only , as there are few servers running on my pc , i have changed the port of glassfish v3 by altering domain.xml ``` <http-listener id="http-listener-1" port="8787" address="0.0.0.0" default-virtual-server="server" server-name="" /> <http-listener id="http-listener-2" port="8181" enabled="false" address="0.0.0.0" security-enabled="true" default-virtual-server="server" server-name=""> ``` Now when i deploy the restful webservies over server or click on Test Restful Webservice in netbeans i am getting a page in a browser which still uses the old port and even there is not webservice option get displayed on it the page is blank. here is the screen shot note: i tried restarting it may times but still using the old port ![enter image description here](https://i.stack.imgur.com/sz6C3.png)
using old port after chaging domain.xml
CC BY-SA 2.5
null
2011-03-24T05:50:16.867
2011-03-25T00:05:25.610
null
null
405,383
[ "netbeans", "glassfish-3", "netbeans6.7" ]
5,415,459
1
5,417,194
null
4
3,275
When saving graphics in Mathematica, is it possible to save figures with opacity in EPS format? For example, ``` Plot[Evaluate[Table[BesselJ[n, x], {n, 4}]], {x, 0, 10}, Filling -> Axis] ``` gives the following figure which saves neatly in any format other than EPS. ![Transparency in Mma](https://i.stack.imgur.com/WuEZ2.png) If I try saving to EPS (in Mathematica 7), the result looks like ![EPS from Mma7](https://i.stack.imgur.com/yGzlU.png) In Mathematica 8 it looks like ![EPS from Mma8](https://i.stack.imgur.com/r9R32.png) Does anyone know how to get opacity in EPS plots (or if that is even possible)? The 'use rasterization for transparency' option doesn't look as impressive as a true EPS on zooming.
Opacity in EPS figures
CC BY-SA 2.5
0
2011-03-24T06:18:08.360
2011-04-05T10:05:01.443
2011-03-25T00:25:06.187
421,225
null
[ "wolfram-mathematica", "opacity", "eps" ]
5,415,717
1
5,429,369
null
0
3,540
I created successfully an .exe file for my python code. As a .py file, it works like a charm. But when I try to run it from the exe version, I get error as follows: ``` Traceback (most recent call last): File "CreateAS.pyw", line 14, in <module> File "pulp\__init__.pyc", line 33, in <module> File "pulp\pulp.pyc", line 103, in <module> File "pulp\solvers.pyc", line 101, in <module> File "pulp\solvers.pyc", line 59, in initialize File "ConfigParser.pyc", line 532, in get ConfigParser.NoSectionError: No section: 'locations' ``` How can I solve that? Thanks in advance. Related Part of My code: ![enter image description here](https://i.stack.imgur.com/rFEfm.jpg) And my Config file: [Download the Config](http://www.sendspace.com/file/im7mht)
ConfigParser.NoSectionError: No section: 'locations' in Exe. Python
CC BY-SA 2.5
null
2011-03-24T06:51:09.133
2011-05-03T01:20:42.590
2011-03-24T13:34:10.990
644,389
644,389
[ "python", "executable" ]
5,415,732
1
5,415,843
null
0
2,427
I am doing a small concept on check box. Actually, i placed the check box image in the table cell.But i can't understand, how to select the particular check box and get the value of the cell in table view, Can any body help me by solving this problem.I will provide the screen shots of table view with coding, ``` - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"in table view cell for row at index"); RequestSongSelectingCell *cell = (RequestSongSelectingCell *) [tableView dequeueReusableCellWithIdentifier:@"requestsingcell"]; if (cell==nil) { [[NSBundle mainBundle] loadNibNamed:@"RequestSongSelectingCell" owner:self options:nil]; NSLog(@"start"); cell=requestingCell; NSLog(@"end"); } NSDictionary *dict=[self.array objectAtIndex:indexPath.row]; NSString *artistname=[dict objectForKey:@"artist"]; NSLog(@"artistname is %@",artistname); cell.artistName.text=artistname; NSString *songtitle=[dict objectForKey:@"title"]; NSLog(@"songtitle is %@",songtitle); cell.artistTitle.text=songtitle; return cell; } -(IBAction)checkButtonPressed:(id)sender { NSLog(@"check box button pressed"); requestingCell.checkBoxButton.imageView.image=[UIImage imageNamed:@"checkbox-checked.png"]; } ``` ![enter image description here](https://i.stack.imgur.com/4B7pZ.png) Thanks and regards, girish
How to Select particular check Box in tableView which is inserted in table cell interface builder in iphone
CC BY-SA 2.5
null
2011-03-24T06:53:22.590
2011-03-24T09:08:39.687
2011-03-24T09:08:39.687
249,916
598,368
[ "iphone", "button", "tableview", "tablecell" ]
5,416,374
1
5,416,759
null
0
3,586
I have a Gridview ![enter image description here](https://i.stack.imgur.com/DVGbS.png) I have Click Button and two labels. (Risk_label and MV_label) Risk and MV column has price value. My Checkbox column names are `NameCheckBoxField1` and `NameCheckBoxField2` How can i calculate only "Which i selected in Gridview" Risk total and MV total in my labels? Example; ``` Risk (Checked rows) --> 10, 20, 30 ---> Risk_label = 60 MV (Checked rows) --> 20, 30, 40 ---> MV_label = 90 ``` : I try this code; ``` double sum = 0; foreach (GridViewRow gvr in GridView1.Rows) { CheckBox cb = (CheckBox)gvr.FindControl("NameCheckBoxField1"); if (cb.Checked) { double amount = Convert.ToDouble(gvr.Cells[1].Text); sum += amount; } } Risk_label.Text = sum.ToString(); ``` But i getting an error.
Total of Selected Items in Gridview
CC BY-SA 2.5
null
2011-03-24T08:11:14.370
2012-12-04T22:23:38.710
2011-03-24T08:39:07.440
447,156
447,156
[ "c#", ".net", "asp.net", "gridview", "calculated-columns" ]
5,416,513
1
5,416,764
null
7
1,685
I am using C++ on Windows 7 with MSVC 9.0, and have also been able to test and reproduce on Windows XP SP3 with MSVC 9.0. If I allocate 1 GB of 0.5 MB sized objects, when I delete them, everything is ok and behaves as expected. However if I allocate 1 GB of 0.25 MB sized objects when I delete them, the memory remains reserved (yellow in [Address Space Monitor](http://hashpling.org/asm/)) and from then on will only be able to be used for allocations smaller than 0.25 MB. This simple code will let you test both scenarios by changing which struct is typedef'd. After it has allocated and deleted the structs it will then allocate 1 GB of 1 MB char buffers to see if the char buffers will use the memory that the structs once occupied. ``` struct HalfMegStruct { HalfMegStruct():m_Next(0){} /* return the number of objects needed to allocate one gig */ static int getIterations(){ return 2048; } int m_Data[131071]; HalfMegStruct* m_Next; }; struct QuarterMegStruct { QuarterMegStruct():m_Next(0){} /* return the number of objects needed to allocate one gig */ static int getIterations(){ return 4096; } int m_Data[65535]; QuarterMegStruct* m_Next; }; // which struct to use typedef QuarterMegStruct UseType; int main() { UseType* first = new UseType; UseType* current = first; for ( int i = 0; i < UseType::getIterations(); ++i ) current = current->m_Next = new UseType; while ( first->m_Next ) { UseType* temp = first->m_Next; delete first; first = temp; } delete first; for ( unsigned int i = 0; i < 1024; ++i ) // one meg buffer, i'm aware this is a leak but its for illustrative purposes. new char[ 1048576 ]; return 0; } ``` Below you can see my results from within [Address Space Monitor](http://hashpling.org/asm/). Let me stress that . ![Quarter Meg](https://i.stack.imgur.com/7lPBw.png) ![Half Meg](https://i.stack.imgur.com/Vrflv.png) This seems like quite a serious problem to me, and one that many people could be suffering from and not even know it. - - -
Why is deleted memory unable to be reused
CC BY-SA 2.5
0
2011-03-24T08:29:07.963
2011-03-25T20:50:06.477
null
null
126,163
[ "c++", "windows-7", "dynamic-memory-allocation", "allocator" ]
5,416,593
1
5,416,770
null
0
214
Hi all i would like to build a menu that looks like a table and when i click on a cell it goes to another view. But i want for the tableView to be inside a UIView. I need starting points, like how it's done, not the actual coding. I dont want someone to write it for me here are some examples on what i want ![1.](https://i.stack.imgur.com/X1NmD.jpg) ![and 2.](https://i.stack.imgur.com/Rr6xi.jpg)
iPhone table menu
CC BY-SA 2.5
null
2011-03-24T08:36:53.720
2011-03-24T08:55:16.223
null
null
450,606
[ "iphone", "uitableview" ]
5,416,790
1
null
null
2
2,195
I have custom edittext with lines and linenumbering like this: ![enter image description here](https://i.stack.imgur.com/1doN8.png) How can I place normal text right from the drawn text? upd: Code: ``` public LinedEditText(Context context, AttributeSet attrs) { super(context, attrs); mRect = new Rect(); mPaint = new Paint(); mPaint.setStyle(Paint.Style.STROKE); mPaint.setColor(Color.rgb(198, 198, 198)); mTextPaint = new Paint(); mTextPaint.setStyle(Paint.Style.STROKE); mTextPaint.setAntiAlias(true); mTextPaint.setColor(Color.rgb(234, 188, 96)); } @Override protected void onDraw(Canvas canvas) { int count = getLineCount(); Rect r = mRect; Paint paint = mPaint; mTextPaint.setTextSize(this.getTextSize()); Paint PaintText = mTextPaint; for (int i = 0; i < count; i++) { int baseline = getLineBounds(i, r); canvas.drawText(Integer.toString(i), r.left, baseline + 1, PaintText); canvas.drawLine(r.left, baseline + 1, r.right, baseline + 1, paint); } super.onDraw(canvas); } ```
How to set padding of text from drawn text?
CC BY-SA 2.5
null
2011-03-24T08:56:26.973
2011-03-25T04:36:40.843
2011-03-24T10:02:18.960
408,863
632,516
[ "android", "layout" ]
5,416,926
1
5,418,401
null
7
13,234
what is the recommended way to handle self-referencing foreignkey constraints in SQL-Server? Table-Model: ![enter image description here](https://i.stack.imgur.com/MHdmX.jpg) `fiData` references a previous record in tabData. If i delete a record that is referenced by `fiData`, the database throws an exception: > "The DELETE statement conflicted with the SAME TABLE REFERENCE constraint "FK_tabDataPrev_tabDataNext". The conflict occurred in database "MyDataBase", table "dbo.tabData", column 'fiData'" if `Enforce Foreignkey Constraint` is set to "Yes". I don't need to cascade delete records that are referenced but i would need to set `fiData=NULL` where it's referenced. My idea is to set `Enforce Foreignkey Constraint` to "No" and create a delete-trigger. Is this recommendable or are there better ways? Thank you.
Self referencing foreign-key constraints and delete
CC BY-SA 3.0
0
2011-03-24T09:13:23.070
2017-02-06T12:25:38.883
2017-02-06T12:25:38.883
1,883,345
284,240
[ "sql", "sql-server-2005", "tsql", "constraints", "foreign-key-relationship" ]
5,416,946
1
null
null
4
7,841
I have a WPF dataGrid which is filled via DataBinding. This list contains different columns. I have two types of rows, one type contains all the columns in the rows, and the other should span one column over all the columns. Is there a easy way to make this possible? (maybe use a ListView instead of a DataGrid?) I attached a screenshot how it should look like: ![enter image description here](https://i.stack.imgur.com/jQcbH.png) I now tried with Item Template Selector: My templates in the Resources (The two templates are not correct, but they are only for testing!) ``` <DataTemplate x:Key="commentTemplate"> <TextBlock Text="{Binding}"/> </DataTemplate> <DataTemplate x:Key="normalTemplate"> <Image Source="{Binding }" /> </DataTemplate> <WPFVarTab:VarTabRowItemTemplateSelector NormalRowsTemplate="{StaticResource normalTemplate}" CommentRowsTemplate="{StaticResource commentTemplate}" x:Key="vartabrowItemTemplateSelector" /> ``` and my Datagrid: ``` <DataGrid AutoGenerateColumns="False" Margin="0,22,0,22" Name="dataGrid" Grid.RowSpan="2" CanUserAddRows="True" RowBackground="Azure" AlternatingRowBackground="LightSteelBlue" ItemTemplateSelector="{StaticResource vartabrowItemTemplateSelector}" > ``` and my Template Selector: ``` public class VarTabRowItemTemplateSelector : DataTemplateSelector { public DataTemplate NormalRowsTemplate { get; set; } public DataTemplate CommentRowsTemplate { get; set; } public override DataTemplate SelectTemplate(object item, DependencyObject container) { S7VATRow vRow = item as S7VATRow; if (vRow == null || string.IsNullOrEmpty(vRow.Comment)) return NormalRowsTemplate; return CommentRowsTemplate; } } ``` I put a stop in the first row in SelectTemplate but this is never called!
WPF dataGrid (or ListView) filled via Binding, different Template for Rows
CC BY-SA 3.0
0
2011-03-24T09:15:15.977
2023-01-24T04:08:21.160
2017-04-17T19:26:50.400
17
579,623
[ "wpf", "templates", "data-binding", "datagrid" ]
5,417,220
1
5,508,060
null
2
2,774
Would like to have clickable column titles eg click on TagCode once and it orders by that, and again it reverses. Same for Number. Using MVC3/Razor and LightSpeed (ORM). I know that a grid eg [http://mvccontrib.codeplex.com/](http://mvccontrib.codeplex.com/) may be the way forward. But as I don't need paging or filtering, I'd like to keep it simple for now. Is there a simple example of code (maybe with an up/down icon) that would help? ![enter image description here](https://i.stack.imgur.com/8Kxk7.png)
Change ordering in MVC3 Index view
CC BY-SA 2.5
null
2011-03-24T09:43:29.223
2013-04-29T21:49:48.457
2013-04-29T21:49:48.457
727,208
26,086
[ "asp.net-mvc", "asp.net-mvc-3", "razor" ]
5,417,227
1
5,419,100
null
0
84
i am getting a weird error when i connect my outlets in my xib. I have a tab bar app, with 3 tabs. the first two work perfectly, but the third tab is having problems - it crashes the app when you push it when any IBOutlets are connected in IB. if you remove the connections, but leave them declared in xcode then it works fine. but as soon as i connect them again, it crashes the app. any thoughts? ********** added code ********* .h ``` @interface Orders : UIViewController { UILabel *username, *customer; } @property (nonatomic, readonly) IBOutlet UILabel *username, *customer; ``` .m > @implementation Orders @synthesize username, customer; message from console > *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key username.' ![enter image description here](https://i.stack.imgur.com/w96h7.png)
weird error when connecting in Interface Builder
CC BY-SA 2.5
null
2011-03-24T09:44:24.857
2011-03-24T12:29:53.963
2011-03-24T10:07:03.740
642,817
642,817
[ "iphone", "cocoa", "xcode", "interface-builder" ]
5,417,491
1
5,417,545
null
1
1,424
I am new to OpenGL as learning exercise I decided to draw a set of horizontal lines from a grid of m x n matrix containing the vertices locations This is what I have ![enter image description here](https://i.stack.imgur.com/4ElHu.jpg) and If I use LINE_STRIP ![enter image description here](https://i.stack.imgur.com/p0sMA.jpg) --- @Thomas Got it working with the following code ``` totalPoints = GRID_ROWS * 2 * (GRID_COLUMNS - 1); indices = new int[totalPoints]; points = new GLModel(this, totalPoints, LINES, GLModel.DYNAMIC); int n = 0; points.beginUpdateVertices(); for ( int row = 0; row < GRID_ROWS; row++ ) { for ( int col = 0; col < GRID_COLUMNS - 1; col++ ) { int rowoffset = row * GRID_COLUMNS; int n0 = rowoffset + col; int n1 = rowoffset + col + 1; points.updateVertex( n, pointsPos[n0].x, pointsPos[n0].y, pointsPos[n0].z ); indices[n] = n0; n++; points.updateVertex( n, pointsPos[n1].x, pointsPos[n1].y, pointsPos[n1].z ); indices[n] = n1; n++; } } points.endUpdateVertices(); ``` Then I update and draw by doing ``` points.beginUpdateVertices(); for ( int n = 0; n < totalPoints; n++ ) { points.updateVertex( n, pointsPos[indices[n]].x, pointsPos[indices[n]].y, pointsPos[indices[n]].z ); } points.endUpdateVertices(); ``` This is the result ![enter image description here](https://i.stack.imgur.com/UtEWb.jpg) --- Fix it by changing the nested for loop ``` for ( int col = 0; col < GRID_COLUMNS; col++ ) { for ( int row = 0; row < GRID_ROWS - 1; row++ ) { int offset = col * GRID_ROWS; int n0 = offset + row; int n1 = offset + row + 1; indices[n++] = n0; indices[n++] = n1; } } ``` Now I can have any number of rows and columns Thanks agin!
How to draw a set of horizontal lines?
CC BY-SA 2.5
null
2011-03-24T10:06:10.773
2011-03-24T15:09:38.850
2011-03-24T15:09:38.850
659,149
659,149
[ "java", "opengl", "processing", "lines" ]
5,417,754
1
5,420,938
null
0
3,974
I have a class, which its constructor is below ``` public GroupsForm(ref Dictionary<string, List<string>> groupsList) ``` I want to use the groupsList in other functions as well so I declared a private member in the class: ``` private Dictionary<string, List<string>> _groupsList; ``` But the problem is when I do `_groupsList = groupsList;` it makes a copy of the `groupsList` and changes made to `_groupsList` doesn't change `groupsList`, as I think it makes a deep copy by default. What I want is that it should point to that list. In C++, this can easily be done via pointers, but can anyone tell me how can I do this in C#? --- Ahmed has posted this [image](https://i.stack.imgur.com/T5fFG.png): ![Debug session showing _groupsList.Count==3, whilst groupsList.Count==0](https://i.stack.imgur.com/T5fFG.png)
Pointer to a dictionary<> in c#
CC BY-SA 2.5
null
2011-03-24T10:30:21.783
2011-03-24T14:47:40.910
2011-03-24T14:47:40.910
15,498
604,493
[ "c#", "dictionary" ]
5,417,837
1
null
null
1
1,443
I working on program (fortran90), which computes an magnetic field of some static set of wires with electric current. Its output is a magnetic field vectors in many points as file with columns "x,y,z,v_x,v_y,v_z). I able to plot this with gnuplot, e.g.: ![Single Vertical Wire](https://i.stack.imgur.com/k8xlk.png) But now I want to rewrite program to output isosurfaces (surfaces at which modulus of magnetic field vector is constant), like this (it is found in internet and don't correspond to first image) ![Some isosurface example](https://i.stack.imgur.com/VezWj.png) Can I do this as second program or with using utility, which will convert my file with 6 columns into ... something format which can be drawn as surface set. Another way of doing this, as I think, is to rewrite first program to compute isosurface directly. Please, recommend me which way is better and how actually I can do this.
Recompute a 3d vector field in a set of isosurfaces
CC BY-SA 2.5
null
2011-03-24T10:37:32.517
2011-06-08T07:00:20.533
null
null
196,561
[ "graphics", "visualization", "data-visualization", "gnuplot" ]