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,210,506
1
5,285,568
null
1
1,857
i have a question about EF4 again :) sorry i can't find any thing on the net. The question is i am using CTP5 Code Only to map (many to many), how do i do it??? But i am doing the old fashion way, i mean i have three tables: 1. Users 2. Companies. 3. UsersToCompanies -> (UserId, CompanyId) How do i map this, it will be really appreciated if you would show me the code example to it, from POCO's to Mapping. --- ![enter image description here](https://i.stack.imgur.com/Vg8wG.jpg) This is the error i receive... ``` This is my entities public class User { public int UserId { get; set; } public int? UserRoleId { get; set; } public string UserName { get; set; } public string UserPassword { get; set; } public DateTime InsertDate { get; set; } public virtual UserRole UserRole { get; set; } //this is my many to many prop public virtual ICollection<Company> Companies { get; set; } } public class Company { public int CompanyId { get; set; } public string CompanyNameHe { get; set; } public string CompanyNameEn { get; set; } public string CompanyParent { get; set; } public DateTime InsertDate { get; set; } //this is my many to many prop public virtual ICollection<User> Users { get; set; } } /*relationship map*/ public class UsersCompanies { public int Id { get; set; } public int UserId { get; set; } public int CompanyId { get; set; } } //mapping public class CompanyMap : BaseConfig<Company> { public CompanyMap() { /*Identity*/ HasKey(c => c.CompanyId); Property(c => c.CompanyId).HasDatabaseGenerationOption(DatabaseGenerationOption.Identity).HasColumnName("COMPANY_ID"); /*Have default values*/ Property(c => c.InsertDate).HasDatabaseGenerationOption(DatabaseGenerationOption.Computed).HasColumnName("INSERT_DATE"); /*simple scalars*/ Property(c => c.CompanyNameHe).HasMaxLength(32).IsRequired().HasColumnName("COMPANY_NAME_HE"); Property(c => c.CompanyNameEn).HasMaxLength(32).IsRequired().HasColumnName("COMPANY_NAME_EN"); Property(c => c.CompanyParent).HasMaxLength(32).IsRequired().HasColumnName("COMPANY_PARENT"); ToTable("CMS_COMPANY", "GMATEST"); } } public class UserMap : BaseConfig<User> { public UserMap() { /*Identity*/ HasKey(c => c.UserId); Property(c => c.UserId).HasDatabaseGenerationOption(DatabaseGenerationOption.Identity).HasColumnName("USER_ID"); /*Have default values*/ Property(c => c.InsertDate).HasDatabaseGenerationOption(DatabaseGenerationOption.Computed).HasColumnName("INSERT_DATE"); /*simple scalars*/ Property(c => c.UserName).HasMaxLength(25).IsRequired().HasColumnName("USER_NAME"); Property(c => c.UserPassword).HasMaxLength(25).IsRequired().HasColumnName("USER_PASSWORD"); Property(c => c.UserRoleId).IsRequired().HasColumnName("USER_ROLE_ID"); /*relationship*/ HasRequired(u => u.UserRole).WithMany().HasForeignKey(t => t.UserRoleId); HasMany(p => p.Companies).WithMany(c => c.Users).Map(mc => { mc.ToTable("UsersCompanies"); mc.MapLeftKey(p => p.UserId, "CompanyId"); mc.MapRightKey(c => c.CompanyId, "UserId"); }); ToTable("CMS_USERS", "GMATEST"); } } public class UsersCompaniesMap : BaseConfig<UsersCompanies> { public UsersCompaniesMap() { /*Identity*/ HasKey(k => k.Id); Property(c => c.Id).HasDatabaseGenerationOption(DatabaseGenerationOption.Identity).HasColumnName("ID"); Property(c => c.UserId).IsRequired().HasColumnName("USER_ID"); Property(c => c.CompanyId).IsRequired().HasColumnName("COMPANY_ID"); ToTable("CMS_USERS_TO_COMPANIES", "GMATEST"); } } ``` --- Here's the error I get: > '((new System.Linq.SystemCore_EnumerableDebugView(ctx.FindAll())).Items[0]).Companies' threw an exception of type 'System.Data.EntityCommandExecutionException'Inner exception: ORA-00942: table or view does not exist
Entity Framework 4.0 CTP5 Many to Many relation ship with a help table?
CC BY-SA 2.5
null
2011-03-06T12:38:23.090
2011-04-01T01:23:56.847
2011-04-01T01:23:56.847
135,152
586,439
[ "c#-4.0", "entity-framework-4", "ora-00942" ]
5,210,603
1
7,094,622
null
2
351
I'm making simple 3D transformations in Flash to rotate stuff, but I get distortions. I can rotation left, right, up, down, but not diagonally since it completely distorts my faces (the ones I draw). I think I fail to move the camera somehow, but I'm not experienced enough to understand my error. Here's the file: [http://www.2shared.com/video/J7ahd6VG/final.html](http://www.2shared.com/video/J7ahd6VG/final.html) Example: when a face is rotated at about 45° around the axis (vertical to screen) and then rotated around the axis the perspective doesn't feel right... the faces are too narrow. ![Face with should be wider IMO](https://i.stack.imgur.com/3bqmy.png) What I do is multiply the rotation matrices between themselves (the mouse position providing the angles) get the transformed points, project them to screen and draw boxes with them. I used this tutorial to get me started: [http://bgstaal.net/blog/?p=57](http://bgstaal.net/blog/?p=57) Has anybody encountered a similar problem?
3D distortion in Flash
CC BY-SA 2.5
null
2011-03-06T12:56:22.550
2011-08-17T14:34:46.017
null
null
176,269
[ "flash", "3d" ]
5,210,714
1
5,210,724
null
2
1,396
What is the difference between multiplicity `*` and `0..*`? For example two versions (A and B) of the same relationship: ![Example](https://i.stack.imgur.com/EjME2.png) What will be more correct for statement ?
UML multiplicity difference
CC BY-SA 2.5
null
2011-03-06T13:17:51.770
2021-11-22T21:15:20.943
2021-11-22T21:15:20.943
3,723,423
438,180
[ "class", "uml", "associations", "class-diagram", "multiplicity" ]
5,210,734
1
8,618,510
null
0
236
I have this FQL query ``` select uid, name, website from user where website != "" and uid in ( select uid2 from friend where uid1 = me() ) ``` I tested this query in the [FQL console](http://developers.facebook.com/docs/reference/rest/fql.query/) a couple of months ago, and it worked fine. Now I try it again and I have this error: ![the error](https://i.stack.imgur.com/AUoVq.png) that can be translated in english like "An error occurred. We are working to solve it soon". I tried with different queries and no one work, all throw the same error. Someone have any suggestions?
FQL console throw "Ops" error
CC BY-SA 2.5
null
2011-03-06T13:21:54.443
2011-12-23T16:44:12.807
2011-03-21T15:29:44.333
604,478
604,478
[ "facebook", "facebook-fql" ]
5,210,946
1
5,210,967
null
0
792
I have a Drupal 7 with 1 field added to registration form - a List with possible values / / : ![enter image description here](https://i.stack.imgur.com/4MAe6.png) ``` # select * from field_data_field_gender; entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_gender_value -------------+--------+---------+-----------+-------------+----------+-------+-------------------- user | user | 0 | 6 | 6 | und | 0 | Male user | user | 0 | 5 | 5 | und | 0 | Male user | user | 0 | 7 | 7 | und | 0 | Female user | user | 0 | 1 | 1 | und | 0 | Male ``` The first value is a default value - to prevent SPAM robots from registering at my site. Is there a way to cancel user registration, when a new user submits the registration web form with the default value? (i.e. only and values are allowed). I've looked at the core Trigger module, but don't see anything suitable there. I've looked at the [hook_user_presave](http://api.drupal.org/api/drupal/modules--user--user.api.php/function/hook_user_presave/7) and [hook_user_insert](http://api.drupal.org/api/drupal/modules--user--user.api.php/function/hook_user_insert/7) API docs, but don't see a way there to cancel an ongoing user registration. (I was expecting to do that by returning a special value from those methods...) Thank you! Alex
Drupal 7: cancel user registration if a wrong field value has been submitted
CC BY-SA 2.5
null
2011-03-06T14:06:59.743
2011-03-07T08:09:30.447
null
null
165,071
[ "drupal", "drupal-7", "user-registration" ]
5,210,971
1
5,211,072
null
1
3,459
Greetings, I'm trying to implement a tableview with asynchronously loading images (80px x 60px). I have the async bit working, however my text (cell.textlabel.text) isn't showing up correctly - it overlaps the image! Here is a photo of my iPhone: ![text overlaps image...](https://i.stack.imgur.com/DxBzw.jpg) Any ideas about how I might fix this? I've tried setting a frame with CGRectMake, but it's not working... All out of ideas here and thought I'd ask the stackoverflow community. Many thanks in advance, Here is the code I am using: -(UITableViewCell )tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath{ ``` static NSString *CellIdentifier = @"ImageCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; } else { AsyncImageView* oldImage = (AsyncImageView*) [cell.contentView viewWithTag:999]; [oldImage removeFromSuperview]; } CGRect frame; frame.size.width=80; frame.size.height=60; frame.origin.x=0; frame.origin.y=0; AsyncImageView* asyncImage = [[[AsyncImageView alloc] initWithFrame:frame] autorelease]; asyncImage.tag = 999; NSString *urlStr = [[NSString alloc] initWithFormat:@"http://www.example.com/driverPhotos/%@/%@_80.png",[options objectAtIndex:[indexPath row]],[images objectAtIndex:[indexPath row]]]; NSURL* url=[NSURL URLWithString:urlStr]; [asyncImage loadImageFromURL:url]; [cell.contentView addSubview:asyncImage]; cell.textLabel.frame=CGRectMake(100, 0, 220, 60); cell.textLabel.text=@"Hi"; return cell; ``` }
UITableView: How to offset text in cell?
CC BY-SA 2.5
null
2011-03-06T14:12:52.323
2013-07-26T17:06:37.170
null
null
395,974
[ "iphone", "uitableview" ]
5,211,012
1
null
null
1
7,105
When I resize my grid , and the horizontal scrollbar appears , I see that an extra space in the header is created for it , but I still see it on the other grid columns. i want to see this scrollbar only on the most left column. this is my code: ``` $(function() { $("#gridTable").jqGrid( { editurl: "clientArray", direction:"rtl", datatype: "local", colNames:['Code1','Code2', 'Code3', 'Code4','Code5','Code6','Code7','Code8','Code9'], colModel:[ {name:'code1',index:'code1', width:60, sorttype:"int" , editable:true, edittype:'text'}, {name:'code2',index:'code2', width:150, sorttype:"date" , editable:true, edittype:'text'}, {name:'code3',index:'code3', width:150 , editable:true, edittype:'text'}, {name:'code4',index:'code4', width:80, sorttype:"float" , editable:true, edittype:'text'}, {name:'code5',index:'code5', width:80, sorttype:"float" , editable:true, edittype:'text'}, {name:'code6',index:'code6', width:80, sorttype:"float" , editable:true, edittype:'text'}, {name:'code7',index:'code7', width:80, sortable:false , editable:true, edittype:'text'}, {name:'code8',index:'code8', width:80, sorttype:"float" , editable:true, edittype:'text'}, {name:'code9',index:'code9', sorttype:"float" , editable:true, edittype:'text'}, ], height: '120px' , scrolling: true, autowidth: true, shrinkToFit: false }); $("#gridTable").closest(".ui-jqgrid-bdiv").css({ 'overflow-y' : 'scroll' }); var mydata = [ {code1:"1",code2:"22",code3:"aaa",code4:"2.00",code5:"25.00",code6:"",code7:"1234",code8:"",code9:""}, {code1:"1",code2:"22",code3:"aaa",code4:"2.00",code5:"25.00",code6:"",code7:"1234",code8:"",code9:""}, {code1:"1",code2:"22",code3:"aaa",code4:"2.00",code5:"25.00",code6:"",code7:"1234",code8:"",code9:""}, {code1:"1",code2:"22",code3:"aaa",code4:"2.00",code5:"25.00",code6:"",code7:"1234",code8:"",code9:""}, {code1:"1",code2:"22",code3:"aaa",code4:"2.00",code5:"25.00",code6:"",code7:"1234",code8:"",code9:""}, {code1:"1",code2:"22",code3:"aaa",code4:"2.00",code5:"25.00",code6:"",code7:"1234",code8:"",code9:""}, {code1:"1",code2:"22",code3:"aaa",code4:"2.00",code5:"25.00",code6:"",code7:"1234",code8:"",code9:""}, ]; for(var i=0;i<=mydata.length;i++) jQuery("#gridTable").jqGrid('addRowData',i+1,mydata[i]); }); ``` and this is a picture of the problem: ![enter image description here](https://i.stack.imgur.com/J5PcN.gif) Any help will be appritiated , Thank's in advance.
jqgrid rtl horizontal scrollbar problem
CC BY-SA 2.5
0
2011-03-06T14:20:42.653
2015-12-04T18:52:18.433
null
null
590,586
[ "jqgrid" ]
5,211,451
1
5,211,765
null
-1
972
Please do you know how to achieve this effect (blur on the background) in Android? ![HTC WildFire shutting down](https://i.stack.imgur.com/SYtWv.png) My HTC WildFire does this when is about to be turned off
How to achieve blurred background visual effect
CC BY-SA 3.0
0
2011-03-06T15:41:47.293
2017-08-26T10:55:03.277
2017-08-26T10:52:51.840
null
396,133
[ "android" ]
5,211,774
1
5,212,606
null
5
6,842
I have a button. It seems to have bottom padding I cannot get rid of: ``` <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Foo"/> ``` In the resource editor, I can click the button, and you see the padding below the bottom edge of the button there. This seems to block me from properly centering the button vertically in a parent RelativeLayout. ![enter image description here](https://i.stack.imgur.com/TjleH.png) I tried setting padding=0dip and layout_margin=0dip, no effect. That bottom padding persists. Thanks
Can't get rid of bottom padding on button
CC BY-SA 2.5
0
2011-03-06T16:32:34.350
2014-08-17T09:46:37.403
null
null
291,701
[ "android" ]
5,211,912
1
5,212,535
null
9
24,182
I have a picture (jpg) that I want to display on the screen. Additionally the picture should be covered partially by a transparent effect. The transparent cover should be dynamic. So e.g. each day more of the picture is shown. Here a picture to show what I mean: ![enter image description here](https://i.stack.imgur.com/F75HZ.jpg) I have the picture without the gray cover and want to add this cover but in different steps. Can someone give me a hint how to do that.
Android: Overlay a picture (jpg) with transparency
CC BY-SA 2.5
0
2011-03-06T16:57:48.053
2012-01-08T14:14:54.187
2011-03-08T11:49:48.510
198,843
647,110
[ "android", "image", "transparency" ]
5,211,950
1
null
null
6
5,203
I'm trying to integrate facebook into my app and so have followed the tutorial at: [Facebook Android](http://developers.facebook.com/docs/guides/mobile/#android) but I can't get the first example (Single Sign-On) to work. When my app loads up I get the facebook dialog but it just says "An error occurred. Please try again later." with a facebook-style "Ok" button at the bottom and there is nothing in logcat: ![App showing Facebook error](https://i.stack.imgur.com/7qgP9.png) I followed the steps in the tutorial but I'm guessing there is something wrong with the APP ID or the hashkey generated by keytool. Here are the steps I followed: 1. clone fb git. 2. create fbSDK project. 3. create own fb project and link the fbSDK as a library. 4. I then did the keytool cmd with openssl and input the password "android" as suggested by others on stackoverflow. 5. I went to developers.facebook.com and created a new app. 6. In "Edit Settings->Mobile and Devices" I put my hash in the box provided. 7. In "Edit Settings->Mobile and Devices" I chose "Native App" as "Application Type" 8. Back in the app I copy and pasted the SSO example code. 9. I changed the "YOUR_APP_ID" in the Facebook() constructor to the APP ID shown on the developers.facebokk.com page for my new app. 10. I ran the app on my phone. I don't know why there is nothing in logcat but when I install it, the Console always, without fail, says the:`ActivityManager: Warning: Activity not started, its current task has been brought to the front` And I can't find any logcat reference to my app or the error I was getting from the facebook sdk which was: `Facebook-ProxyAuth(4828): Failed to read calling package's signature.` I have been at this for a few hours now and any help would be greatly appreciated. I can't believe the facebook SDK and help is so sketchy for Android, facebook should be ashamed of themselves. Thanks, InfinitiFizz
Facebook SSO example not working - "An error ocurred. Please try again later"
CC BY-SA 2.5
0
2011-03-06T17:02:20.803
2013-01-11T20:58:04.650
null
null
224,216
[ "android", "facebook", "facebook-android-sdk" ]
5,211,966
1
5,212,652
null
2
1,129
Solution: thanks to the suggestion from @Guarav I was inspired and FINALLY came up with the solution, please tell me what you guys think of my solution and any ways I can improve this further. And yes, thats a challenge. Bet you can't. ``` <?php function selectLang($a,$b,$c,$d,$e){ echo "<div id='menu2' style='width:250px; margin-left:-40px;'> <ul class='double'> <li style='background:#333333; color:white;'>Demonstration Play Feature</li>"; echo "<form method='post' action=''>"; echo "<li><select name='languages[]'>"; while(list(,$values1) = each($c) AND list(,$list) = each($b) AND list(,$list2) = each($e)) { echo "<option name='languages[]' value='$values1' />" . $list . "</option>"; echo "<option name='languages[]' value='$values1' />" . $list2 . "</option>"; } echo "</select>"; echo "<input type='submit' value='Send' name='poll' /></li>"; echo "</form>"; echo "<li><b>" . $d ."</b>"; echo "<button onclick='JavaScript:changeSheets(1)' style='background-image:url(/misc/FYP/images/def.png); width:40px; height:40px; border:none;'></button>"; echo "<button onclick='JavaScript:changeSheets(2)' style='background-image:url(/misc/FYP/images/def1.png); width:40px; height:40px; border:none;'></button>"; echo "<button onclick='JavaScript:changeSheets(3)' style='background-image:url(/misc/FYP/images/def2.png); width:40px; height:40px; border:none;'></button>"; echo "<button onclick='JavaScript:changeSheets(4)' style='background-image:url(/misc/FYP/images/def3.png); width:40px; height:40px; border:none;'></button></li>"; echo "</ul></div>"; } $values = array("English","Japanese","Chinese","Hungarian","Arabic","French","Russian","Thai","Korean","German"); $lang_eng1 = array("English","Japanese","Chinese","Hungarian","Arabic"); $lang_eng2 = array("French","Russian","Thai","Korean","German"); $lang_chi = array("English","Japanese","Chinese","Hungarian","Arabic"); $lang_chi2 = array("French","Russian","Thai","Korean","German"); $lang_jap = array("英語","日本語","中国語","ハンガリー語","アラビア語"); $lang_jap2 = array("フランス語","ロシア語","タイ語","韓国語","German"); $lang_rus = array("Английский","Японский","Китайский","Венгерский","Арабский"); $lang_rus2 = array("Французский","Русский","Тайский","Корейский","German"); $lang_kor = array("영어","일어","중국어","헝가리어","아라비아어"); $lang_kor2 = array("프랑스어","러시아어","타이어","한국어","German"); $lang_ger = array("Englisch","Japanisch","Chinesisch","Ungarisch","Arabisch",); $lang_ger2 = array("Französisch","Russisch","Siamesisch","Koreanisch","German"); $h_eng = "Select Your Language"; $h_chi = "Select Your Language"; $h_jap = "言語の選択"; $h_rus = "Выбрать язык"; $h_kor = "언어 선택"; $h_ger = "Wählen Sie Ihre Sprache vor"; $h2_eng = "Change the Colour Scheme"; $h2_chi = "Change the Colour Scheme"; $h2_jap = "カラースキームの変更"; $h2_rus = "Изменить фон"; $h2_kor = "색채 설계"; $h2_ger = "Ändern Sie den Farbe Entwurf"; ?> ``` On my website I have a change language feature with radio boxes, if one is clicked then the language of the website will change. This looks like: ![enter image description here](https://i.stack.imgur.com/Q10Mz.png) The code for what is produced above is: ``` <?php function selectLang($a,$b,$c,$d,$e,$f,$g){ echo "<div id='menu2' style='width:400px; margin-left:-40px;'> <ul class='triple'> <li style='background:#333333; color:white; width:400px;'>Demonstration Play Feature</li>"; echo "<form method='post' action=''>"; echo "<li style='width:400px;'>"; while(list(,$values1) = each($c) AND list(,$list) = each($b) AND list(,$list2) = each($e) AND list(,$list3) = each($f) AND list(,$list4) = each($g)) { echo "<input type='radio' name='languages[]' value='$values1' style='padding:3px;' />" . $list; echo "<input type='radio' name='languages[]' value='$values1' style='padding:3px;' />" . $list2; echo "<input type='radio' name='languages[]' value='$values1' style='padding:3px;' />" . $list3; echo "<input type='radio' name='languages[]' value='$values1' style='padding:3px;' />" . $list4 . "<br />"; } echo "<input type='submit' value='Send' name='poll' /></li>"; echo "</form>"; echo "</ul></div>"; } $values = array("English","Japanese","Chinese","Hungarian","Arabic","French","Russian","Thai","Korean","German"); $lang_eng1 = array("English","Japanese","Chinese","Hungarian"); $lang_eng2 = array("French","Russian","Arabic"); $lang_eng3 = array("Thai","Korean","German"); $lang_eng4 = array("Korean","German"); $lang_chi = array("English","Japanese","Chinese","Hungarian","Arabic"); $lang_chi2 = array("French","Russian","Thai","Korean","German"); $lang_jap = array("英語","日本語","中国語","ハンガリー語","アラビア語"); $lang_jap2 = array("フランス語","ロシア語","タイ語","韓国語","German"); $lang_rus = array("Английский","Японский","Китайский","Венгерский","Арабский"); $lang_rus2 = array("Французский","Русский","Тайский","Корейский","German"); $lang_kor = array("영어","일어","중국어","헝가리어","아라비아어"); $lang_kor2 = array("프랑스어","러시아어","타이어","한국어","German"); $lang_ger = array("Englisch","Japanisch","Chinesisch","Ungarisch","Arabisch",); $lang_ger2 = array("Französisch","Russisch","Siamesisch","Koreanisch","German"); $h_eng = "Select Your Language"; $h_chi = "Select Your Language"; $h_jap = "言語の選択"; $h_rus = "Выбрать язык"; $h_kor = "언어 선택"; $h_ger = "Wählen Sie Ihre Sprache vor"; ?> ``` However, I dont want the radio/check boxes anymore. Is there anyway i can change this to a drop down box which will still work exactly the same? thank you for any suggestions. **Edit: @Gaurav I tried you suggestion with the final code which looked like: ``` <?php function selectLang($a,$b,$c,$d,$e){ echo "<div id='menu2' style='width:250px; margin-left:-40px;'> <ul class='double'> <li style='background:#333333; color:white;'>Demonstration Play Feature</li>"; echo "<form method='post' action=''>"; echo "<li>"; while(list(,$values1) = each($c) AND list(,$list) = each($b) AND list(,$list2) = each($e)) { echo "<input type='radio' name='languages[]' value='$values1' />" . $list; echo "<input type='radio' name='languages[]' value='$values1' />" . $list2 . "<br />"; } ***echo "<li>"; echo "<select name='languages[]'>"; while(list(,$values1) = each($c) AND list(,$list) = each($b) AND list(,$list2) = each($e) AND list(,$list3) = each($f) AND list(,$list4) = each($g)) { echo "<option value='$values1'>" . $list ."</option>"; echo "<option value='$values1'>" . $list ."</option>"; echo "<option value='$values1'>" . $list ."</option>"; } echo "</select>"; echo "</li>";*** echo "<input type='submit' value='Send' name='poll' /></li>"; echo "</form>"; echo "</ul></div>"; } $values = array("English","Japanese","Chinese","Hungarian","Arabic","French","Russian","Thai","Korean","German"); $lang_eng1 = array("English","Japanese","Chinese","Hungarian","Arabic"); $lang_eng2 = array("French","Russian","Thai","Korean","German"); $lang_chi = array("English","Japanese","Chinese","Hungarian","Arabic"); $lang_chi2 = array("French","Russian","Thai","Korean","German"); $lang_jap = array("英語","日本語","中国語","ハンガリー語","アラビア語"); $lang_jap2 = array("フランス語","ロシア語","タイ語","韓国語","German"); $lang_rus = array("Английский","Японский","Китайский","Венгерский","Арабский"); $lang_rus2 = array("Французский","Русский","Тайский","Корейский","German"); $lang_kor = array("영어","일어","중국어","헝가리어","아라비아어"); $lang_kor2 = array("프랑스어","러시아어","타이어","한국어","German"); $lang_ger = array("Englisch","Japanisch","Chinesisch","Ungarisch","Arabisch",); $lang_ger2 = array("Französisch","Russisch","Siamesisch","Koreanisch","German"); $h_eng = "Select Your Language"; $h_chi = "Select Your Language"; $h_jap = "言語の選択"; $h_rus = "Выбрать язык"; $h_kor = "언어 선택"; $h_ger = "Wählen Sie Ihre Sprache vor"; $h2_eng = "Change the Colour Scheme"; $h2_chi = "Change the Colour Scheme"; $h2_jap = "カラースキームの変更"; $h2_rus = "Изменить фон"; $h2_kor = "색채 설계"; $h2_ger = "Ändern Sie den Farbe Entwurf"; ?> ``` But it only showed a drop down box, it didnt have any values in the drop box. But its a start thanks. any ideas on how we can develop this further?**
Change radio/checkbox to drop down box with minimal changes to PHP coding?
CC BY-SA 2.5
null
2011-03-06T17:05:57.267
2011-03-07T04:41:28.343
2011-03-06T19:39:34.777
383,691
383,691
[ "php", "html", "internationalization", "checkbox", "drop-down-menu" ]
5,212,003
1
5,212,032
null
1
3,412
I am implementing `@font-face` into a small experimental site of mine: [http://mutanttractor.github.com/StackOverflow-Android-Dashboard/](http://mutanttractor.github.com/StackOverflow-Android-Dashboard/) In Chrome the header text looks like this: ![Chrome](https://i.stack.imgur.com/puk1j.png) In Firefox 3.6 and 4b12 it looks like this: ![Firefox](https://i.stack.imgur.com/YBpkj.png) The 2 font is of the exact same weight and size, but this occurs no matter what the face is, even if I don't use `@font-face` - standard system fonts display the same irregularity, has anyone else experienced this? Not only that, the text boxes are bigger too... I'm on OSX 10.6 ;)
Fonts always thicker in Firefox than Chrome regardless of font-family
CC BY-SA 2.5
null
2011-03-06T17:10:57.313
2011-03-06T17:31:59.407
2011-03-06T17:31:59.407
571,593
571,593
[ "javascript", "html", "css", "font-face" ]
5,212,102
1
null
null
2
693
I've tried to find a solution that matches my basic CSS problems when designed new pages. But without luck, even though it has come close... Say I have the following: - - ![enter image description here](https://i.stack.imgur.com/yDAxp.png) The `Content` div should fill the rest of the height... is that if I use `position:absolute`,`left:0;bottom:0;top:0;` on the `Content`; if the contents of the `Content` exceeds the browser's initial height, this will happen: ![enter image description here](https://i.stack.imgur.com/l06GB.png) ... And the page will be weird-looking. How is that possible?
Classic 'inner div to fill rest of height'-question!
CC BY-SA 2.5
0
2011-03-06T17:27:17.377
2011-03-06T18:28:49.007
null
null
515,772
[ "html", "css" ]
5,212,279
1
5,212,298
null
0
268
I have a problem related to my previous article [css, button selection and html tags](https://stackoverflow.com/questions/5211879/css-button-selection-and-html-tags) Not very good with javascript if any one could offer some insight as to where im going. Thanks to any one who can help ``` $(function() { $('input.field'). focus(function() { if(this.title==this.value) { this.value = ''; } }). blur(function(){ if(this.value=='') { this.value = this.title; } }); var currentPage = 1; $('#slider .buttons span').live('click', function() { var timeout = setTimeout(function() {$("img").trigger("slidermove")}, 300); var fragments_count = $(this).parents('#slider:eq(0)').find('.fragment').length; var fragmet_width = $(this).parents('#slider:eq(0)').find('.fragment').width(); var perPage = 1; var numPages = Math.ceil(fragments_count/perPage); var stepMove = fragmet_width*perPage; var container = $(this).parents('#slider:eq(0)').find('.content'); var firstPosition = 0; var lastPosition = -((numPages-1)*stepMove); if ($(this).hasClass('next')) { currentPage ++; if (currentPage > numPages) { currentPage = 1; container.animate({'left': firstPosition}); return; }; container.animate({'left': -((currentPage - 1)*stepMove)}); }; if ($(this).hasClass('prev')) { currentPage --; if (currentPage < 1) { currentPage = numPages; container.animate({'left': lastPosition}); return; }; container.animate({'left': -((currentPage-1)*stepMove)}); }; });}); ``` ![enter image description here](https://i.stack.imgur.com/DDWts.jpg)
jquery problem on tab selection
CC BY-SA 2.5
null
2011-03-06T17:54:50.840
2011-03-06T18:21:04.940
2017-05-23T10:32:35.693
-1
477,228
[ "javascript", "asp.net", "html" ]
5,212,416
1
null
null
1
1,462
I have two classes: `GHTable` and `GHColumn`. A `GHTable` object has an `NSMutableArray` with `GHColumn` objects. Each `GHColumn` has a `name` property (`NSString`). I have made an UML diagram to make this more clear. Note that I am using Core Data: ![UML](https://i.stack.imgur.com/TamlJ.png) I want to bind the `columns` property of the `GHTable` object to the columns of an `NSTableView`. I want to bind the titles of the columns of the `NSTableView` to the `name` property of the corresponding `GHColumn`. My question: is there a way to do this through Cocoa Bindings, and if so: how? Or do I need to manually implement the data source for the `NSTableView`?
Binding columns in an NSTableView
CC BY-SA 2.5
0
2011-03-06T18:15:02.743
2016-11-21T10:54:31.920
2016-11-21T10:54:31.920
4,370,109
null
[ "objective-c", "cocoa", "nstableview", "cocoa-bindings" ]
5,212,460
1
5,212,538
null
0
199
Is it possible for someone to make this algorithm easy to understand to enter into a calculation for my application. ![Algorithm](https://i.stack.imgur.com/x3eTR.png) Thanks To explain: ![Description of Algorithm](https://i.stack.imgur.com/hB9ic.png)
How can this algorithm be expressed in programming for a calculation?
CC BY-SA 2.5
null
2011-03-06T18:21:09.557
2011-03-06T18:44:03.097
null
null
251,671
[ "algorithm", "equation" ]
5,212,637
1
null
null
3
2,022
The line that is highlighted on Eclipse is really hard for me to see. I am color blind, but I can see colors. I assume the the highlight color in the outline screen has very little contrast to the other colors. Thank you! Anyway I will try and attach a graphic.... anyone know to change this?![enter image description here](https://i.stack.imgur.com/joFuy.jpg)
eclipse editor colors - how to set in outline view
CC BY-SA 2.5
0
2011-03-06T18:52:27.327
2014-03-04T10:18:48.920
null
null
528,130
[ "eclipse", "colors", "setting" ]
5,212,724
1
5,212,847
null
2
1,462
What exactly does this mean -- "Maybe IRB bug!"? What does that tell me about the potential root cause of an exception? ![enter image description here](https://i.stack.imgur.com/h3yBO.png) Note that the text "Maybe IRB bug!!" was printed after the stack trace as part of the exception output.
"Maybe IRB bug!"
CC BY-SA 3.0
null
2011-03-06T19:07:23.590
2017-01-06T13:36:24.603
2017-01-06T13:36:24.603
474,597
251,257
[ "ruby-on-rails", "irb" ]
5,212,914
1
5,213,461
null
0
624
I have to draw the following shape in a rectangle. What is the best way to do it? The blue areas are the background color. The black is a border and the red is the interior color. I want to paint the black and red only. Thanks ![enter image description here](https://i.stack.imgur.com/qlnJ6.png)
Iphone/Ipad : What is the fastest way to draw an irregular polygon in a rectangle?
CC BY-SA 2.5
null
2011-03-06T19:44:46.647
2011-03-06T21:16:49.320
null
null
325,557
[ "iphone", "ipad" ]
5,213,023
1
5,213,043
null
1
2,501
This is on Windows Forms, .NET 4.0. ``` public class Person { public int Id { get; set; } public string Name { get; set; } public string Lastname { get; set; } public override string ToString() { return String.Format("{0} {1}", Name, Lastname); } } ``` I read on the [MSDN page](http://msdn.microsoft.com/en-us/library/system.windows.forms.listcontrol.displaymember.aspx), that if no .DisplayMember is set to the comboBox control, it uses the default ToString of the object, that's the reason why I'm overriding the toString method. The result is as expected: ![enter image description here](https://i.stack.imgur.com/8usjO.jpg) Here's how I'm loading the data: ``` private void button2_Click(object sender, EventArgs e) { var people = LoadSamplePeople(); comboBox1.DataSource = people; } private IEnumerable<Person> LoadSamplePeople() { return new List<Person>() { new Person(){ Id = 1, Name = "Sergio", Lastname = "Tapia" }, new Person(){ Id = 2, Name = "Daniel", Lastname = "Tapia" } }; } ``` The problem arises, when I set the of the control, it seems display defaults to use value. ``` private void button2_Click(object sender, EventArgs e) { var people = LoadSamplePeople(); comboBox1.ValueMember = "Id"; comboBox1.DataSource = people; } private IEnumerable<Person> LoadSamplePeople() { return new List<Person>() { new Person(){ Id = 1, Name = "Sergio", Lastname = "Tapia" }, new Person(){ Id = 2, Name = "Daniel", Lastname = "Tapia" } }; } ``` ![enter image description here](https://i.stack.imgur.com/OS86T.jpg) How would I set the valueMember but default the DisplayMember to the ToString method? Please note that the display is a combination of two properties on the Person class. :)
A bit of confusion regarding ComboBoxes, ValueMember and DisplayMember
CC BY-SA 2.5
0
2011-03-06T20:03:37.963
2011-03-06T20:07:42.057
null
null
null
[ "c#", "winforms", "combobox" ]
5,213,186
1
5,341,819
null
4
2,615
I am using Core Text to draw some text. I would like to get the various run bounds, but when I call `CTRunGetImageBounds`, the rect that is returned is the correct size, but in the wrong location. Specifically, the line origin is at the end of the text as a whole. ``` - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); self.transform = CGAffineTransformMakeScale(1.0, -1.0); CGContextSetTextMatrix(context, CGAffineTransformIdentity); [[UIColor whiteColor] set]; CGContextFillRect(context, self.bounds); NSMutableAttributedString* attrString = [[NSMutableAttributedString alloc] initWithString:@"Blue should be underlined."]; NSRange blueRange = NSMakeRange(0, 4); [attrString beginEditing]; //make all text size 20.0 [attrString addAttribute:(NSString *)kCTFontAttributeName value:(id)CTFontCreateWithName((CFStringRef)@"Helvetica", 20.0, NULL) range:NSMakeRange(0, [attrString length])]; //make the text appear in blue [attrString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(id)[[UIColor blueColor] CGColor] range:blueRange]; //next make the text appear with an underline [attrString addAttribute:(NSString *)kCTUnderlineStyleAttributeName value:[NSNumber numberWithInt:1] range:blueRange]; [attrString endEditing]; CGMutablePathRef path = CGPathCreateMutable(); CGRect bounds = CGRectMake(10.0, 10.0, 200.0, 200.0); [[UIColor redColor] set]; CGContextFillRect(context, bounds); CGPathAddRect(path, NULL, bounds); CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((CFAttributedStringRef)attrString); CTFrameRef frame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0, 0), path, NULL); CTFrameDraw(frame, context); for (id lineObj in (NSArray *)CTFrameGetLines(frame)) { CTLineRef line = (CTLineRef)lineObj; for (id runObj in (NSArray *)CTLineGetGlyphRuns(line)) { CTRunRef run = (CTRunRef)runObj; CGRect runBounds = CTRunGetImageBounds(run, context, CFRangeMake(0, 0)); NSLog(@"bounds: %@", NSStringFromCGRect(runBounds)); [[UIColor greenColor] set]; CGContextFillRect(context, runBounds); } } CFRelease(framesetter); CFRelease(frame); [attrString release]; } ``` Produces: ![results](https://i.stack.imgur.com/YLsWr.png)
CTRunGetImageBounds returning inaccurate results
CC BY-SA 2.5
0
2011-03-06T20:30:37.610
2011-04-11T22:21:28.863
null
null
198,514
[ "ios", "core-text" ]
5,213,393
1
5,216,785
null
0
217
Well the basic layout I want is: ![Layout](https://i.stack.imgur.com/fTSXs.png) Keep in mind those items on the side should be centered in the part between the center one and the side of the page. I'm looking for a valid cross-browser(HTML5/CSS3 compatible is fine) solution for an HTML page which hopefully doesn't use javascript
How to make a layout where 3 items are centered in height/width of the HTML page
CC BY-SA 2.5
null
2011-03-06T21:03:47.700
2011-03-07T07:01:51.363
null
null
531,928
[ "html", "css" ]
5,213,400
1
5,213,984
null
0
1,813
![Buttons on UI](https://i.stack.imgur.com/Q3QsY.jpg) Image shows the buttons on my UI in vb.net All these buttons are having background images. Now what i want is these buttons be shown as inactive when actions corresponding to them are not available so I am making them cmd.enable = false but still on UI there is no visual effect of this disabling them on these buttons. They keep looking same as in enabled mode. So how to give effect of disabled state to these buttons. In the same way i want effect to be visible when mouse is hovered over these buttons and buttons are clicked
giving effects to buttons in vb.net
CC BY-SA 2.5
null
2011-03-06T21:04:52.473
2011-03-06T22:41:10.210
null
null
553,223
[ "vb.net", "winforms", "button" ]
5,213,640
1
5,226,525
null
10
19,203
The border styles for header cells and data cells in a WPF 4.0 DataGrid are inconsistent.. Header cells have a border that includes a left vertical border line and a right vertical border line around the header text. Data grid text column data lines are styled such that only the right side has a vertical border line. The following sample image illustrates this (note that the grid line color has been changed to #D0D0D0): ![enter image description here](https://i.stack.imgur.com/8fAjH.png) Here is the same image zoomed in to show the inconsistency: ![enter image description here](https://i.stack.imgur.com/cwrcv.png) How do you change the grid headers (perhaps via a templates or styles) to remove the left border, so that the header vertical border lines line up with the data border lines?
Remove left border grid line for WPF DataGrid header columns to match data grid lines
CC BY-SA 2.5
0
2011-03-06T21:46:26.353
2014-06-12T17:17:21.753
2011-03-07T02:52:02.337
473,798
473,798
[ "wpf", "wpf-controls", "wpfdatagrid" ]
5,213,695
1
5,219,311
null
83
25,162
In one of my projects that's kinda an aggregator, I parse feeds, podcasts and so from the web. If I use sequential approach, given that a large number of resources, it takes quite a time to process all of them (because of network issues and similar stuff); ``` foreach(feed in feeds) { read_from_web(feed) parse(feed) } ``` So I want to implement concurrency and couldn't decide if I should basically use ThreadPools to process with worker threads or just rely on TPL to get it sorted. ThreadPools for sure will handle the job for me with worker threads and I'll get what I expect (and in multi-core CPU environments, the other cores will be also utilized also). ![concurrency](https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Thread_pool.svg/400px-Thread_pool.svg.png) But I still want to consider TPL too as it's recommend method but I'm a bit concerned about it. First of all I know that TPL uses ThreadPools but adds additional layer of decision making. I'm mostly concerned of the condition that where a single-core environment is present. If I'm not wrong TPL starts with a number worker-threads equal to number of available CPU-cores at the very beginning. I do fear of TPL producing similar results to sequential approach for my IO-bound case. So for IO-bound operations (in my case reading resources from web), is it best to use ThreadPools and control the things, or better just rely on TPL? Can TPL also be used in IO-bound scenarios? : My main concern is that -- environment will TPL just behave like sequential approach or will it still offer concurrency? I'm already reading [Parallel Programming with Microsoft .NET](http://msdn.microsoft.com/en-us/library/ff963549.aspx) and so the [book](http://oreilly.com/catalog/0790145310262) but couldn't find an exact answer for this. Note: this is a re-phrasing of my previous question [ [Is it possible to use thread-concurrency and parallelism together?](https://stackoverflow.com/questions/5203871/is-it-possible-to-use-thread-concurrency-and-parallelism-together) ] which was quite phrased wrong.
Should i use ThreadPools or Task Parallel Library for IO-bound operations
CC BY-SA 3.0
0
2011-03-06T21:53:48.177
2016-12-06T01:31:00.697
2017-05-23T12:10:41.897
-1
170,181
[ "c#", "multithreading", "task-parallel-library", "threadpool", "parallel-extensions" ]
5,213,753
1
null
null
63
148,801
![enter image description here](https://i.stack.imgur.com/mTNSr.jpg) You've seen iterations of this type of progress bar on sites like paypal. How does one go about setting this up using `CSS` and `jquery`? I have 4 pages and each page is a step... so 4 steps.
Build Step Progress Bar (css and jquery)
CC BY-SA 3.0
0
2011-03-06T22:04:26.347
2023-02-10T04:37:54.160
2016-03-17T13:53:40.033
3,576,214
544,140
[ "jquery", "css", "progress-bar", "multi-step" ]
5,213,805
1
5,214,443
null
0
484
To be clear, this is what I'm talking about: ![enter image description here](https://i.stack.imgur.com/dfaKZ.png) Unfortunately, Apple hasn't provided an easy way to make this kind of button. Most people use `BWToolKit`, but that doesn't work with Xcode 4. Is there any way I can stylize my buttons to look like that without using `BWToolKit`? Thanks in advance.
Create HUD button without framework
CC BY-SA 2.5
0
2011-03-06T22:12:14.277
2011-03-07T00:04:53.380
null
null
456,851
[ "cocoa", "macos", "interface-builder" ]
5,214,171
1
null
null
0
1,330
I just uploaded my application to app engine and everything seems to be working correctly except that the cron jobs are not running. I have a cron.yaml file in my root directory which is basically: ``` cron: - description: do stuff url: /cron/dostuff schedule: every 1 minutes - description: do other stuff url: /cron/dootherstuff schedule: every 1 days ``` This maps to the following portion of my app.yaml file: ``` - url: /cron script: main.py login: admin ``` Which maps to my application in main.py where it says: ``` # cron ('/cron/(.*)',handlers.CronHandler), ``` Which finally maps to the CronHandler program like so: ``` class CronHandler(BaseHandler): def get(self, mode=""): if mode == "dostuff": # stuff should happen here ``` I've uploaded the app to google and everything else seems to be working correctly. And when I hit the cron URLs directly (i.e., myapp.appspot.com/cron/dostuff) it works correctly. But the cron jobs don't run on their own, and when I go in to the dashboard and view the Cron Jobs page, I see this. ![enter image description here](https://i.stack.imgur.com/VFwNI.png) Any idea what I'm doing wrong?
app engine cron jobs not running in production
CC BY-SA 2.5
null
2011-03-06T23:12:54.553
2011-03-07T06:07:50.833
2011-03-06T23:26:11.883
100,506
100,506
[ "python", "google-app-engine", "yaml" ]
5,214,385
1
5,214,410
null
3
298
I came across this UI in the Geico app. How is this "grouped" UITextField style achieved (Street, City, State)? Is it just done by explicitly restyling 3 UITextField elements or is there a control I am missing to handle this? ![enter image description here](https://i.stack.imgur.com/UiS8W.png) Note: I am using MonoTouch.
UITextField list? How to achieve similar UI?
CC BY-SA 3.0
null
2011-03-06T23:54:48.970
2014-06-07T23:25:34.430
2014-06-07T23:25:34.430
759,866
67,179
[ "iphone", "ipad", "ios", "xamarin.ios", "monodevelop" ]
5,214,497
1
5,215,322
null
4
3,013
I use the following function to update the contents of a canvas element, where frame_data is an array of `width*height*3`. ``` function updateCanvas(frame_data, width, height) { img = ctx.createImageData(width, height); for (i=0, j=0; j < frame_data.length; i++) { if ((i > 0) && (i%3==0)) { img.data[i] = 255; } else { img.data[i] = frame_data[j++]; } } ctx.putImageData(img, 0, 0); }` ``` It doesn't seem to work on Chrome 8, since I am getting this image as a result: ![enter image description here](https://i.stack.imgur.com/HwZSf.png) I've checked the `img.data` array produced by this function and the data are correct. So I assume that the problem is with the `putImageData` function. Has anyone else encountered the same problem? What could be wrong?
putImageData doesn't show image
CC BY-SA 2.5
null
2011-03-07T00:15:57.710
2011-03-07T02:51:07.703
null
null
583,315
[ "javascript", "google-chrome", "canvas" ]
5,214,714
1
5,214,794
null
2
1,323
I am learning C and have some issues. Please, take a look at the picture below: ![enter image description here](https://i.stack.imgur.com/4FQ4a.png) When reading the highlight text, I am quite confused. Is it that: when the user starts entering some inputs, the input is put directly and immediately in the buffer. And when Enter key is hit ('\n'), the program reads and gets input from the buffer and then clear the buffer? If it is, suppose in the program, I use: `scanf("%d", &a_variable)` and then I enter , then is read and clear from the buffer.So, In the buffer now contains ""? Am I right? Or I am misunderstanding something?
Question about buffering, getchar() and scanf()?
CC BY-SA 2.5
0
2011-03-07T01:00:33.467
2011-03-07T01:16:02.077
null
null
253,656
[ "c", "buffer" ]
5,214,762
1
null
null
0
771
I am watching a lecture from IIT about data structures ( Dr.naveen garg ) About AVL tree. ![Screen shot](https://i.stack.imgur.com/23H1z.png) My Question : Why the height of T2 can't be (h-1)?
AVL tree insertion question
CC BY-SA 2.5
null
2011-03-07T01:10:36.927
2017-07-10T05:52:25.547
2011-03-07T01:35:20.907
1,288
407,141
[ "data-structures", "avl-tree" ]
5,214,764
1
7,479,680
null
12
19,534
I'd like to share a photo with caption pre-filled from my app via a share intent, on facebook. I know how to share photo or how to share text, but how do I share them together? Example code ``` Intent shareCaptionIntent = new Intent(Intent.ACTION_SEND); shareCaptionIntent.setType("image/*"); //set photo shareCaptionIntent.setData(examplePhoto); shareCaptionIntent.putExtra(Intent.EXTRA_STREAM, examplePhoto); //set caption shareCaptionIntent.putExtra(Intent.EXTRA_TEXT, "example caption"); shareCaptionIntent.putExtra(Intent.EXTRA_SUBJECT, "example caption"); startActivity(Intent.createChooser(shareCaptionIntent,getString(R.string.share))); ``` If a set type to `image/*` then a photo is uploaded without the caption prefilled. If a set it to `text/plain` only the caption is uploaded without the photo..... --- My guess is that the issue is that the Android Facebook App doesn't look for `Intent.EXTRA_TEXT` when it filters an `ACTION_SEND` Intent with type `image/*` for photo uploading. ![Share caption via Android Intent](https://i.stack.imgur.com/ixfm7.png)
How to share photo with CAPTION via Android share intent on Facebook?
CC BY-SA 3.0
0
2011-03-07T01:10:58.040
2011-09-27T13:07:15.037
2011-09-14T22:23:31.920
808,940
338,825
[ "android", "facebook" ]
5,214,907
1
5,214,922
null
3
1,036
I've got a c homework problem that is doing my head in and will be greatful if anyone can help point me in the right direction. If I have two minutes points on an analog watch such as t1 (55 minutes) and t2 (7 minutes), I need to calculate the shortest amount of steps between the two points. What I've come up with so far is these two equations: ``` -t1 + t2 + 60 = -55 + 7 + 60 = 12 t1 - t2 + 60 = 55 - 7 + 60 = 108 12 is lower then 108, therefore 12 steps is the shortest distance. ``` This appears to work fine if I compare the two results and use the lowest. However, if I pick out another two points for example let t1 = 39 and t2 = 34 and plug them into the equation: ``` -t1 + t2 + 60 = -39 + 34 + 60 = 55 t1 - t2 + 60 = 39 - 34 + 60 = 35 35 is lower then 55, therefore 35 steps is the shortest distance. ``` However, 35 isn't the correct answer. 5 steps is the shorest distance (39 - 34 = 5). My brain is a little fried, and I know I am missing something simple. Can anyone help? ![Analog clock face](https://i.stack.imgur.com/y8vjO.jpg)
Shortest path algorithm for an analog clock
CC BY-SA 2.5
null
2011-03-07T01:34:06.967
2011-03-07T02:07:51.477
null
null
342,274
[ "algorithm", "math" ]
5,215,126
1
5,215,237
null
2
1,555
Here is my code. I'm attempting to draw a simple quadrilateral, and place a checkerboard pattern on both sides of it. I want to allow the user to rotate around this piece with the mouse. Everything works fine, other than the texture - it is slanted, and only covers about half of the quad. Can anyone see something glaringly obvious that I am doing wrong? Thanks. ``` #include "glut-3.7.6-bin\glut.h" // Constants for rotating camera #define CAMERA_RELEASE 0 #define CAMERA_ROTATE 1 #define CAMERA_ZOOM 2 // Current camera control setting int cameraSetting; // Current viewing angle and scale of the scene float viewAngleX, viewAngleY, scaleFactor = 1.0; // Click coordinates int clickX, clickY; // Screen size const int screenWidth = 600; const int screenHeight = 600; // Texture data GLuint texture; //////////////////////////////////////////////////////////////// // Function Prototypes //////////////////////////////////////////////////////////////// GLuint loadTexture(const char * filename); //////////////////////////////////////////////////////////////// // Callback and Initialization Functions //////////////////////////////////////////////////////////////// void callbackMouse(int button, int state, int x, int y) { if (state == GLUT_DOWN) { // Store clicked coordinates clickX = x; clickY = y; // Set camera mode to rotate if (button == GLUT_LEFT_BUTTON) { cameraSetting = CAMERA_ROTATE; } // Set camera mode to zoom else if (button == GLUT_RIGHT_BUTTON) { cameraSetting = CAMERA_ZOOM; } } // Ignore camera commands if no button is clicked else if (state == GLUT_UP) { cameraSetting = CAMERA_RELEASE; } } void callbackKeyboard(unsigned char key, int x, int y) { if (key == 'q') { exit(0); } } void callbackMotion(int x, int y) { if (cameraSetting == CAMERA_ROTATE) { // Camera rotate setting - adjust the viewing angle by the direction of motion viewAngleX += (x - clickX) / 5.0; viewAngleX = viewAngleX > 180 ? (viewAngleX - 360) : (viewAngleX < - 180 ? (viewAngleX + 360) : viewAngleX); clickX = x; viewAngleY += (y - clickY) / 5.0; viewAngleY = viewAngleY > 180 ? (viewAngleY - 360) : (viewAngleY < - 180 ? (viewAngleY + 360) : viewAngleY); clickY = y; } else if (cameraSetting == CAMERA_ZOOM) { // Polygonal scale to simulate camera zoom float currentScaleFactor = scaleFactor; scaleFactor *= (1+ (y - clickY) / 60.0); scaleFactor = scaleFactor < 0 ? currentScaleFactor : scaleFactor; clickY = y; } glutPostRedisplay(); } void callbackDisplay() { // Clear the screen glEnable(GL_DEPTH_TEST); glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); // Set world window glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(60, 1, 1, 100); // Setup 3D environment glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(0,0,5, 0,0,0, 0,1,0); // Rotate and scale 3D environment to current user settings glRotatef(viewAngleX, 0, 1, 0); glRotatef(viewAngleY, 1, 0, 0); glScalef(scaleFactor, scaleFactor, scaleFactor); glBegin(GL_QUADS); glTexCoord2d(0.0, 0.0); glVertex3f(-30, -5, -30); glTexCoord2d(1.0, 0.0); glVertex3f(30, -5, -30); glTexCoord2d(1.0, 1.0); glVertex3f(30, -5, 30); glTexCoord2d(0.0, 1.0); glVertex3f(-30, -5, 30); glEnd(); // Swap frame buffers glutSwapBuffers(); } void windowInitialization() { // Enable textures by default glEnable(GL_TEXTURE_2D); // Load texture texture = loadTexture("checkerboard.raw"); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); } //////////////////////////////////////////////////////////////// // Main //////////////////////////////////////////////////////////////// int main(int argc, char** argv) { // GLUT Initialization glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB|GLUT_DOUBLE|GLUT_DEPTH); glutInitWindowSize(screenWidth,screenHeight); // Create main window glutCreateWindow("Test"); windowInitialization(); // Register callback functions glutDisplayFunc(callbackDisplay); glutMouseFunc(callbackMouse); glutMotionFunc(callbackMotion); glutKeyboardFunc(callbackKeyboard); // Enter event processing loop glutMainLoop(); } //////////////////////////////////////////////////////////////// // Prototyped Functions //////////////////////////////////////////////////////////////// GLuint loadTexture(const char * filename) { GLuint texture; int width, height; BYTE * data; FILE * file; // open texture data file = fopen( filename, "rb" ); if ( file == NULL ) return 0; // allocate buffer width = 256; height = 256; data = (BYTE *) malloc( width * height * 3 ); // read texture data fread( data, width * height * 3, 1, file ); fclose( file ); glGenTextures( 1, &texture ); glBindTexture( GL_TEXTURE_2D, texture ); glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); // texture wraps over at the edges glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 1 ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 1); // build texture gluBuild2DMipmaps( GL_TEXTURE_2D, 3, width, height, GL_RGB, GL_UNSIGNED_BYTE, data ); // free buffer free( data ); return texture; } ``` ![half-covered,distorted](https://i.stack.imgur.com/RARS0.png)
Why is my openGL texture only covering half of my quad? Source included
CC BY-SA 2.5
null
2011-03-07T02:14:09.703
2012-11-14T02:05:03.983
2011-03-07T04:00:16.640
404,917
404,917
[ "c", "opengl", "textures", "glut" ]
5,215,219
1
null
null
0
1,459
I'm currently using the method shown in [this](http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html) Cocoa with Love article to create a custom NSWindow subclass. As in the example, I needed to have a roughly 10px margin around the content of the window in order to draw an arrow (I'm creating a popover style window). I had to have the margin around the entire window instead of just the side with the arrow on it because I wanted to be able to change the arrow position without having to reposition the content. To summarize, the method I'm using to do this is (relevant code is at the bottom): - `contentRectForFrameRect:``frameRectForContentRect:styleMask:`- `contentView``contentView` The problem is that the autoresizing masks of views the actual content view of the window are completely messed up. Here is how I'm setting up the content in interface builder: ![Layout](https://i.stack.imgur.com/gzkqn.png) Here's how the autoresizing mask of the table view scroll view is set up: ![Table View Autoresizing](https://i.stack.imgur.com/1AOIo.png) And here's how the text label's autoresizing mask is set: ![Label Autoresizing](https://i.stack.imgur.com/HeRPi.png) And here's what the result looks like in-app: ![Actual result](https://i.stack.imgur.com/n2vL9.png) ``` #define CONTENT_MARGIN 10.0 - (NSRect)contentRectForFrameRect:(NSRect)windowFrame { windowFrame.origin = NSZeroPoint; return NSInsetRect(windowFrame, CONTENT_MARGIN, ICONTENT_MARGIN); } - (NSRect)frameRectForContentRect:(NSRect)contentRect { return NSInsetRect(contentRect, -CONTENT_MARGINT, -CONTENT_MARGIN); } + (NSRect)frameRectForContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle { return NSInsetRect(contentRect, -CONTENT_MARGIN, -CONTENT_MARGIN); } - (NSView*)contentView { return _popoverContentView; } - (void)setContentView:(NSView *)aView { if ([_popoverContentView isEqualTo:aView]) { return; } NSRect bounds = [self frame]; bounds.origin = NSZeroPoint; SearchPopoverWindowFrame *frameView = [super contentView]; if (!frameView) { frameView = [[[SearchPopoverWindowFrame alloc] initWithFrame:bounds] autorelease]; [super setContentView:frameView]; } if (_popoverContentView) { [_popoverContentView removeFromSuperview]; } _popoverContentView = aView; [_popoverContentView setFrame:[self contentRectForFrameRect:bounds]]; [_popoverContentView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; [frameView addSubview:_popoverContentView]; } ``` I thought that maybe the popover content was going over the margins somehow, so I drew a border around the content view, but no, everything is as should be. The only issue is that the autoresizing masks of the label and table view inside the content view do not work as they should. Any advice is greatly appreciated. [INPopoverController](https://github.com/indragiek/INPopoverController)
Custom NSWindow content margin causes mess up with autoresizing mask
CC BY-SA 2.5
null
2011-03-07T02:31:46.713
2011-08-25T15:13:01.583
2011-03-07T02:47:30.857
153,112
153,112
[ "objective-c", "cocoa", "nsview", "nswindow", "popover" ]
5,215,632
1
5,671,455
null
3
6,642
I am trying to apply the same gradient as per the screen shot below using `CGGradientCreateWithColorComponents`. This is what I'm using at the moment, however it's not quite right and I'm after a better way of trying to guess these values. I'd also like to know how to actually determine what these values are as this code was grabbed from a tutorial, which didn't explain much at all in terms of what the components are. ``` CGColorSpaceRef myColorspace = CGColorSpaceCreateDeviceRGB(); CGFloat components[8] = { 1, 1, 1, 1, 0.866, 0.866, 0.866, 1 }; CGFloat locations[2] = { 0.0, 1.0 }; CGGradientRef myGradient = CGGradientCreateWithColorComponents(myColorspace, components, locations, 2); ``` ![enter image description here](https://i.stack.imgur.com/Ycr0w.png)
iPhone - Help with CGGradientCreateWithColorComponents and creating gradient as per screenshot
CC BY-SA 2.5
0
2011-03-07T03:49:28.193
2013-08-07T14:09:26.790
2013-08-07T14:09:26.790
60,724
264,802
[ "iphone", "objective-c", "gradient", "quartz-graphics", "cgcolor" ]
5,215,889
1
5,215,901
null
15
45,126
My login form has 4 controls. The user can input name, password and enter on button for login. I'd like the Enter key to trigger the Login action after the Name and Password textboxes are filled out. How can this be done? Trying to avoid `btnLogin.Focus()` under the TextBox event. ![screen](https://i.stack.imgur.com/BxwRc.jpg)
Enter key triggering the Login button
CC BY-SA 2.5
0
2011-03-07T04:39:18.267
2017-11-29T05:22:30.733
2011-03-07T04:45:50.103
23,199
336,100
[ "c#", "winforms" ]
5,216,020
1
5,216,144
null
57
84,270
Can I do like this in HTML: ![enter image description here](https://i.stack.imgur.com/UoorI.png) I want to add border title ("General Information" in this image) on my `div`. Is it possible? How to do it? --- The image is not HTML page's image, its a Java app's image.
Give border title in div
CC BY-SA 3.0
0
2011-03-07T05:03:55.560
2022-10-18T13:17:41.573
2020-06-20T09:12:55.060
-1
559,070
[ "html", "css", "forms" ]
5,216,097
1
5,216,886
null
0
1,124
Javascript code - ``` $.jqplot.config.enablePlugins = true; var defaultHighlighter = {tooltipAxes: 'y',showTooltip: true,tooltipLocation: 'n',tooltipOffset: 10,yvalues:1,formatString:'%.0f user'}; var globalTicks = [[-1,' '],[0,'12 am'],[1,'1 am'],[2,'2 am'],[3,'3 am'],[4,'4 am'],[5,'5 am'],[6,'6 am'],[7,'7 am'],[8,'8 am'],[9,'9 am'],[10,'10 am'],[11,'11 am'],[12,'12 pm'],[13,'1 pm'],[14,'2 pm'],[15,'3 pm'],[16,'4 pm'],[17,'5 pm'],[18,'6 pm'],[19,'7 pm'],[20,'8 pm'],[21,'9 pm'],[22,'10 pm'],[23,'11 pm'],[24,[' ']]]; var fullGraphOptions = {seriesDefaults: {pointLabels:{show:false},showMarker:true,markerOptions:{style: 'filledCircle'}},axes:{xaxis:{rendererOptions:{tickRenderer:$.jqplot.CanvasAxisTickRenderer},tickOptions:{angle:-45},ticks:globalTicks},yaxis:{min:0,tickOptions:{formatString:'%.0f'}}},highlighter:defaultHighlighter}; fullanalysis1 = $.jqplot('hourlyGraph-1', [[[63,63],[68,68],[87,87],[108,108],[135,135],[138,138],[147,147],[167,167],[130,130],[145,145],[144,144],[127,127],[134,134],[132,132],[147,147],[158,158],[157,157],[166,166],[170,170],[124,124],[107,107],[77,77],[62,62],[88,88]]], fullGraphOptions); fullanalysis2 = $.jqplot('hourlyGraph-2', [[[63,63],[68,68],[87,87],[108,108],[135,135],[138,138],[147,147],[167,167],[130,130],[145,145],[144,144],[127,127],[134,134],[132,132],[147,147],[158,158],[157,157],[166,166],[170,170],[124,124],[107,107],[77,77],[62,62],[88,88]]], fullGraphOptions); fullanalysis3 = $.jqplot('hourlyGraph-3', [[[63,63],[68,68],[87,87],[108,108],[135,135],[138,138],[147,147],[167,167],[130,130],[145,145],[144,144],[127,127],[134,134],[132,132],[147,147],[158,158],[157,157],[166,166],[170,170],[124,124],[107,107],[77,77],[62,62],[88,88]]], fullGraphOptions); fullanalysis4 = $.jqplot('hourlyGraph-4', [[[63,63],[68,68],[87,87],[108,108],[135,135],[138,138],[147,147],[167,167],[130,130],[145,145],[144,144],[127,127],[134,134],[132,132],[147,147],[158,158],[157,157],[166,166],[170,170],[124,124],[107,107],[77,77],[62,62],[88,88]]], fullGraphOptions); ``` All the four graphs have the same result - ![enter image description here](https://i.stack.imgur.com/U6rn4.png) No plotting is done at all. The data I have in the code is just a sample. What could be the problem? The screenshot's of Firefox running on Fedora 14. Thank you,all. Edit: I don't get any error in the Firebug console.
Blank graph - No data is plotted
CC BY-SA 2.5
null
2011-03-07T05:15:28.860
2011-03-07T07:29:03.837
2011-03-07T06:03:17.713
305,357
305,357
[ "javascript", "jqplot" ]
5,216,151
1
5,277,267
null
11
32,159
I'm able to connect to SQL server 2008 R2 when I use `Provider=SQLOLEDB` in my connection string. But when I use `Provider=SQLNCLI` in connection string I'm unable to connect. > ADODB.Connection error '800a0e7a'Provider cannot be found. It may not be properly installed./test.asp, line 7 Code written within `test.asp` is below ``` <% Set cn = Server.CreateObject("ADODB.Connection") 'Doesn't work cn.Open "Provider=SQLNCLI;Server=remoteServer\SQL2008R2;Database=DB;UID=MyUser;PWD=pa55word;" 'Works Perfectly 'cn.Open "Provider=SQLOLEDB;Server=remoteServer\SQL2008R2;Database=DB;UID=MyUser;PWD=pa55word;" cn.CommandTimeout = 900 cn.Close Response.write("dfjslkfsl") %> ``` The SQL Server I'm trying to connect (from classic ASP Page within my IIS 7 on windows 7) is located on different server in a different network to which I'm connecting using VPN. I tested sql native client by creating a sql native client System DSN connection to the said Sql server 2008 R2 (which is connected through VPN) from ODBC datasource administrator. And it got connected successfully. These snaps are from my windows 7 system ![Appwiz.cpl snap](https://i.stack.imgur.com/HI3Ks.png) ![IIS 7 features](https://i.stack.imgur.com/RgOfM.png) ![enter image description here](https://i.stack.imgur.com/r5crO.png) - - -
Cannot connect from Classic ASP to SQL Server 2008 R2 using SQL Native Client (Windows 7 - IIS7)
CC BY-SA 2.5
0
2011-03-07T05:23:59.517
2015-07-14T04:58:28.980
2011-03-08T08:52:02.353
447,356
148,271
[ "sql-server-2008", "iis-7", "asp-classic", "connection", "sql-server-native-client" ]
5,216,228
1
null
null
4
3,085
Here is a screenshot of something which I'm trying to achieve ![enter image description here](https://i.stack.imgur.com/aVRrt.gif) I would like to add unique label (like numbers) to each overlayitem of the map. I have done the basic part of adding the overlayitems and showing them on the map. But this where I am stuck for a long time
How to draw unique labels on overlayitem of mapview in android
CC BY-SA 2.5
0
2011-03-07T05:36:56.583
2011-03-23T09:05:37.847
null
null
266,272
[ "android", "google-maps", "overlayitem" ]
5,216,705
1
5,216,774
null
0
213
We are trying to build an app with Facebook Connect on the local server. When we give the URL as follows, it still does not work on the local system: ![](https://i.stack.imgur.com/RqefN.png) Here are the errors I get: > API Error Code: 191 API ErrorDescription: The specified URL is not owned by the application ErrorMessage: redirect_uri is not owned by the application.
Facebook Connect vs localhost
CC BY-SA 3.0
null
2011-03-07T06:51:18.933
2017-02-01T08:05:47.537
2017-02-01T08:05:47.537
5,315,974
155,196
[ "facebook" ]
5,216,716
1
null
null
-1
54
![](https://i.stack.imgur.com/9IjIS.jpg) I am developing a Windows Service in VB.NET. I have added a two new .xsl files in my project. My problem is that file: how can I insert that file into a particular string? ``` Dim CTD As String = ?? ``` I need to call that CTD.xsl in the above line of code. Can somebody please help me?
How can I insert the contents of a file into a string variable?
CC BY-SA 2.5
null
2011-03-07T06:53:38.210
2011-03-07T07:09:19.503
2011-03-07T07:05:50.630
366,904
617,448
[ ".net", "vb.net", "windows-services" ]
5,216,794
1
5,219,051
null
4
8,882
I want to build a spring mvc project by maven, I got the following error: ``` The following artifacts could not be resolved: org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0, org.hibernate:hibernate-validator:jar:4.2.0.Beta1: Could not find artifact org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0 in central (http://repo1.maven.org/maven2) ``` I use eclipse and m2eclipse plugin. I don't know how to add local repository. And I found for different versions of eclipse,the result is different. Some can pass, some fail. I am confused. By the way where can I find the version of maven used in m2eclipse? Update:Now I can handle hibernate-validator,but even I deleted all spring mvc dependencies,I found there are many other library are dependent on com.springsource.org.aopalliance, ![enter image description here](https://i.stack.imgur.com/ud9o8.png)
Maven build error - The following artifacts could not be resolved
CC BY-SA 4.0
null
2011-03-07T07:03:25.937
2022-04-10T12:16:40.387
2022-04-10T12:16:40.387
5,446,749
401,441
[ "maven-2", "maven", "maven-3" ]
5,216,861
1
5,217,444
null
2
513
## Table Definition ![enter image description here](https://i.stack.imgur.com/l21yM.png) ## Model Definition ![enter image description here](https://i.stack.imgur.com/AGQGT.png) ## Code ``` using MyRandomizer.Models; namespace MyRandomizer { class Program { static void Main(string[] args) { using (Database1Entities db = new Database1Entities()) { Category c = new Category(); c.Name = "Integral"; db.Categories.AddObject(c); db.SaveChanges(); } } } } ``` ## Output ![enter image description here](https://i.stack.imgur.com/JMCA2.png) ## Question Why does my default value column automatically get populated by a date of January 1, 0001?
Why does my default value column automatically get populated by a date of January 1, 0001?
CC BY-SA 2.5
null
2011-03-07T07:14:12.693
2011-03-07T08:30:41.393
null
null
397,524
[ "c#", "sql-server", "entity-framework", "entity-framework-4" ]
5,217,038
1
5,217,124
null
1
194
Below is my code that works fine on IE 8 but it doesn't work on safari 5. The text wraps in IE and the div's layout is properly in placed on IE. But on safari everything is a mess. Guys please help me to make this work on safari 5. I want the layout on safari to look like this on the picture ![enter image description here](https://i.stack.imgur.com/0x56x.jpg) Thanks in advance :) Note: I just added a sample url from web to make the display better. ``` <html> <body> <div style="overflow:auto;width:200px;clear:both;border:1px black solid;padding:4px;"> <div class="clsContainer div1" style="border:1px solid black;margin-right:3px;float:left;"> <img src="http://www.scicomcommerce.com/media/catalog/product/cache/1/image/5e06319eda06f020e43594a9c230972d/m/y/my-computer.jpg" alt="" style="height:50px;width:50px;"/> </div> <div class="clsContainer div2" style="float:left;"> <div id="first" style="border:1px solid black;margin-bottom:3px;word-wrap:break-word;padding:2px;"> The quick brown fox jumps over the lazy dog. </div> <div id="second" style="border:1px solid black;margin-top:8px;word-wrap:break-word;padding:2px;"> ThisIsAVeryLongggggWordThatDoesNotWrapPleaseHelpMeSolveThisWordWrapIssueInSafari </div> </div> </div> </body> </html> ```
Display in IE is good but on safari it crashes
CC BY-SA 2.5
null
2011-03-07T07:35:42.807
2011-03-07T08:50:46.663
null
null
249,580
[ "html", "css", "internet-explorer", "safari" ]
5,217,148
1
5,217,254
null
0
1,235
I'm trying to implement a jquery image slideshow into my website, and since I didn't create it myself, I'm having trouble identifying all of the css attributes. The three problems I am having are: 1) when the images scroll, there is a parent container that stretches outside of the width of the slideshow panel. 2) I've adjusted the margins and padding of every attribute, but I can't get the black padding around the image to disappear. 3) I can't figure out how to adjust the space between the images. Here you can see the black padding around the image: ![enter image description here](https://i.stack.imgur.com/zSLy5.png) And here you can see both the margin between images and the image floating outside the container: ![enter image description here](https://i.stack.imgur.com/4uoSW.png) The bar with the magnifying glass is part of my IDE. So here is the HTML running the slider: ``` <div class="slider"> <div id="header"> <div class="wrap"> <div id="slide-holder"> <div id="slide-runner"> <a href=""><img id="slide-img-1" src="images/nature-photo.png" class="slide" alt="" /></a> <a href=""><img id="slide-img-2" src="images/nature-photo1.png" class="slide" alt="" /></a> <a href=""><img id="slide-img-3" src="images/nature-photo2.png" class="slide" alt="" /></a> <a href=""><img id="slide-img-4" src="images/nature-photo3.png" class="slide" alt="" /></a> <a href=""><img id="slide-img-5" src="images/nature-photo4.png" class="slide" alt="" /></a> <a href=""><img id="slide-img-6" src="images/nature-photo4.png" class="slide" alt="" /></a> <a href=""><img id="slide-img-7" src="images/nature-photo6.png" class="slide" alt="" /></a> <div id="slide-controls"> <p id="slide-client" class="text"><strong>post: </strong><span></span></p> <p id="slide-desc" class="text"></p> <p id="slide-nav"></p> </div> </div> </div> <script type="text/javascript"> if(!window.slider) var slider={};slider.data=[ {"id":"slide-img-1","client":"nature beauty","desc":"nature beauty photography"}, {"id":"slide-img-2","client":"nature beauty","desc":"add your description here"}, {"id":"slide-img-3","client":"nature beauty","desc":"add your description here"}, {"id":"slide-img-4","client":"nature beauty","desc":"add your description here"}, {"id":"slide-img-5","client":"nature beauty","desc":"add your description here"}, {"id":"slide-img-6","client":"nature beauty","desc":"add your description here"}, {"id":"slide-img-7","client":"nature beauty","desc":"add your description here"} ]; </script> </div> </div> </div> ``` And here is the CSS: ``` * { margin : 0; padding : 0; } html { height : 100%; } div.slider { height : 100%; color : #a4a4a4; cursor : default; font-size : 11px; line-height : 16px; text-align : center; background-position : 50% 0; background-repeat : no-repeat; font-family : Tahoma, sans-serif; background-color: black; } a:link, a:visited { color : #fff; text-decoration : none; } a img { width: 92%; } div.wrap { text-align : left; } div#top div#nav { float : left; clear : both; width : 993px; height : 52px; } div#top div#nav ul { float : left; width : 700px; height : 52px; list-style-type : none; } div#nav ul li { float : left; height : 52px; } div#nav ul li a { border : 0; height : 52px; display : block; line-height : 52px; text-indent : -9999px; } div#header { margin : -1px 0 0; } div#video-header { height : 683px; margin : -1px 0 0; } div#header div.wrap { /* image height */ height : 300px; background : url(images/header-bg.png) no-repeat 50% 0; } div#header div#slide-holder { /* slider container */ z-index : 40; width : 915px; height : 299px; position : absolute; } div#header div#slide-holder div#slide-runner { top : 9px; left : 9px; width : 973px; height : 278px; overflow : hidden; position : absolute; } div#header div#slide-holder img { margin : 0; display : none; position : absolute; } div#header div#slide-holder div#slide-controls { left : 0; top: 0; width : inherit; height : 46px; width: 896px; display : none; position : absolute; background-color: rgba(0,0,0, .5); } div#header div#slide-holder div#slide-controls p.text { float : left; color : #fff; display : inline; font-size : 10px; line-height : 16px; margin-top: 13px; } div#header div#slide-holder div#slide-controls p#slide-nav { /* page numbers */ float : right; height : 24px; display : inline; margin : 11px 15px 0 0; } div#header div#slide-holder div#slide-controls p#slide-nav a { float : left; width : 24px; height : 24px; display : inline; font-size : 11px; margin : 0 5px 0 0; line-height : 24px; font-weight : bold; text-align : center; text-decoration : none; background-position : 0 0; background-repeat : no-repeat; } div#header div#slide-holder div#slide-controls p#slide-nav a.on { background-position : 0 -24px; } div#header div#slide-holder div#slide-controls p#slide-nav a { background-image : url(images/slide-nav.png); } div#nav ul li a { background : url(images/nav-bg.png) no-repeat; } ``` I know it's probably hard to see just by looking at the markup, but does anyone with a keen eye for CSS see the problem?
Having problems implementing a jQuery photo slideshow
CC BY-SA 2.5
null
2011-03-07T07:50:02.933
2011-06-16T11:17:46.600
null
null
497,681
[ "jquery", "html", "css", "jquery-ui", "slider" ]
5,217,520
1
5,232,203
null
0
2,550
I have a IKImageBrowserView embedded inside an NSScrollView. I'm trying achieve scroll bars like those we can see in Lion or other apps like Sparrow and Reeder. I would like my scroll bars to go over the content. So fare the only problem I have is that the content goes over the scroll bar instead of going under. I know that I can play with the `-tile` methode of the NSScrollView to arrange the different pieces but I don't know how I can use it to my purpose. : This is the code in my `-tile` : ``` - (void)tile { [super tile]; // We move the scroll to be just below the scrollView NSScroller *verticalScroller = [self verticalScroller]; NSRect verticalScrollerFrame = [verticalScroller frame]; verticalScrollerFrame.origin.x -= 117.0; [verticalScroller setFrame:verticalScrollerFrame]; // We expand the scrollview to embrace the whole window NSRect scrollViewFrame = [self frame]; scrollViewFrame.size.width = 655.0; [self setFrame:scrollViewFrame]; } ``` Here is what it looks like: ![preview](https://cl.ly/52ah/scrollbar_pb.png) Does anyone know why the content the scroll bars go under the content view? Or have an example? I've already looked at this topic : [Overlay NSScroller over content](https://stackoverflow.com/questions/4236190/overlay-nsscroller-over-content) and a lot of others without finding an answer. Thanks for your help!
Custom NSSroller inside NSScrollView
CC BY-SA 2.5
0
2011-03-07T08:41:27.590
2011-12-29T10:01:11.997
2017-05-23T12:01:33.300
-1
325,587
[ "cocoa", "nsscrollview", "ikimagebrowserview", "nsscroller" ]
5,217,612
1
5,219,183
null
0
1,507
Hot to customize navigation bar that appear on "More" tab in UITabBarController to have 2 px line (in different color) as bottom border? I created subclass of the UINavigationBar that overrides drawrect: method with drawing of that line, and that works for first four tabs, except tabs that are under more navigation controller. Any help? ![Custom Navigation bar](https://i.stack.imgur.com/36iTr.png)
Custom navigationBar on moreNavigationController
CC BY-SA 2.5
null
2011-03-07T08:53:13.210
2012-07-19T17:54:47.017
null
null
310,262
[ "iphone", "xcode", "uitabbarcontroller", "uinavigationbar" ]
5,217,819
1
null
null
8
2,470
I've got a database with a 40k venues and growing right now. Assuming I'm the red dot ![Easy](https://i.stack.imgur.com/P2sAY.jpg) I want to be able to retrieve the closest record as quickly as possible. However the distance too the next item could be anything. And there also might be 0-n matches. But do I need to load all 40000 results when I'm just looking for 1? ![Less obvious](https://i.stack.imgur.com/wbKLN.jpg) How can I sort the records by distance? Should it be done in MYSQL, or PHP? This calculation happens at almost every request, per user, per page, so the solution needs to be quick. Thanks for the quick and promising answers, I'll need to review these resources, and will accept/comment on answers within a few days.
Effectively selecting the closest (distance) record from a database
CC BY-SA 2.5
0
2011-03-07T09:16:21.290
2020-07-14T00:29:12.883
2011-03-07T09:27:35.220
81,785
81,785
[ "mysql", "math", "distance" ]
5,218,309
1
5,218,347
null
2
4,642
![table](https://i.stack.imgur.com/cobAF.png) I have [a top script](http://preferans.de/top20.php) displaying a list of users (will turn this script into a Drupal block later), with a link to their individual profile web page. For the most of the users I have a foto in my database, which I'd love to display at the top page, but I don't know how to resize their fotos. I.e. a user might have a 160x100 picture or a 20x40 picture, but on my top page I want the fotos to fit inside a rectangle. And I can't just write because the images will appear distorted then (i.e. ratio won't be preserved). Is there a way in HTML, CSS or jQuery to scale an image, but keep its ratio? (And I don't want to download each image by a Perl/PHP-script, then run ImageMagick or anything similar - this is too heavy)
Resize image but keep its ratio - is it possible by means of HTML, CSS or jQuery?
CC BY-SA 3.0
0
2011-03-07T10:08:42.573
2017-07-12T23:58:53.377
2017-07-12T23:58:53.377
3,885,376
165,071
[ "jquery", "html", "css", "image" ]
5,218,671
1
5,218,758
null
4
2,477
I am adding image in BackBarButtonItem of navigation bar, image gets in button but image is not scale to fill what would be the issue. Here is the code i am using and it displays in following way. ``` UIImage *backImage = [UIImage imageNamed:@"back.png"]; UIBarButtonItem *newBackButton = [[UIBarButtonItem alloc] initWithImage:backImage style:UIBarButtonItemStylePlain target:self action:@selector(backAction)]; [self.navigationItem setBackBarButtonItem: newBackButton]; [newBackButton release]; [backImage release]; ``` ![enter image description here](https://i.stack.imgur.com/ALGoV.png) Actually it should look like, below image. ![enter image description here](https://i.stack.imgur.com/kLFNL.png) Thanks!
UIImage in setBackBarButtonItem in UINavigationBar iphone
CC BY-SA 2.5
0
2011-03-07T10:44:56.643
2011-07-07T10:29:13.470
null
null
236,732
[ "iphone", "uinavigationbar", "uinavigationitem" ]
5,218,691
1
5,219,817
null
61
38,628
I want to show all my validation error's of `EdiText` fields in a popup as shown in below image: ![Error alert in popup](https://i.stack.imgur.com/zXCJC.png) As far as I know Android has drawables: > 1) popup_inline_error.9.png ![popup_inline_error.9.png](https://i.stack.imgur.com/ET9t1.png) > 2) popup_inline_error_above.9.png ![popup_inline_error_above.9](https://i.stack.imgur.com/T9rch.png) > 3) indicator_input_error.png ![indicator_input_error.png](https://i.stack.imgur.com/1luXA.png) I am able to display the red error indicator inside the right side of the `EditText` by using: ``` Drawable err_indiactor = getResources().getDrawable(R.drawable.indicator_input_error); mEdiText.setCompoundDrawablesWithIntrinsicBounds(null, null, err_indiactor, null); ``` Now also i want to display the error message as shown is the first image but it seems I am not getting any idea about this, though I think it should be a Custom Toast.
How to display input errors in popup?
CC BY-SA 3.0
0
2011-03-07T10:46:26.097
2014-03-03T13:27:50.433
2014-03-03T13:27:50.433
2,065,587
457,982
[ "android", "validation", "popup", "android-edittext" ]
5,218,929
1
5,218,968
null
5
4,305
I am trying to include [WinPcap](http://www.winpcap.org/) library in one of my Visual C++ program and I am using Visual Studio 10 Ultimate. In the [documentation](http://www.winpcap.org/docs/docs_412/html/group__wpcapsamps.html) it says > To add a preprocessor definition, you must select Properties from the Project menu, then select C/C++ from the list control on the left, and under the category Preprocessor, you must add the definition under the Preprocessor Definitions text box. `WPCAP` I have performed this step successfully, then > To add a new library to the project, you must select Properties from the Project menu, then select Linker from the list control on the left, and under the category Input add the name of the new library in the Additional Dependencies text box. `wpcap.lib` Now I have problem while performing the third step. > To add a new path where Microsoft Visual Studio will look for the libraries, you must select Options from the Tools menu, then Project and Solutions from the list control on the left, VC++ Directories, then choose Library Files in the Show directories for combobox, and the add the path in the box below. Tools -> Options -> Project and Solutions -> VC++ Directories. Here it says ![enter image description here](https://i.stack.imgur.com/7Pr6U.png) Now where is this user property sheet located ? Can some one point me in a right direction? Thanks.
Using WinPcap in VC++ programs
CC BY-SA 2.5
0
2011-03-07T11:09:39.877
2012-06-07T21:23:04.020
null
null
92,487
[ "visual-studio-2010", "visual-c++", "winpcap" ]
5,218,974
1
5,256,979
null
1
434
i am developing a ebook reader app for iPad and i am facing a issue related to the design aspects of the bookshelf. I am posting a sample photo of my bookshelf here. I want the book shelf to have a horizontal navigation similar to that of the iBooks. Will this come under violation of Apple's HIG?? Will they consider this design to be a imitation of their iBooks design and reject it?? I'm worried... ![enter image description here](https://i.stack.imgur.com/9i8r3.png)
Will my app get rejected because of this?
CC BY-SA 2.5
null
2011-03-07T11:14:08.923
2011-03-10T08:08:22.783
2020-06-20T09:12:55.060
-1
541,582
[ "iphone", "ipad", "appstore-approval" ]
5,219,030
1
5,219,090
null
26
32,796
I have `div` of fixed width containing only `input` text box and `width` of that `input` is set to `100%`. I expect it to fill the `div` but instead it is slightly longer. Demonstration code: HTML: ``` <div class="container"> <input class="content" id="Text1" type="text" /> </div> ``` CSS: ``` .container { width: 300px; height: 30px; border: thin solid red; } .content { width: 100%; } ``` Result (Firefox): ![enter image description here](https://i.stack.imgur.com/yIbr0.png) This happens also in IE 8, Chrome, Safari... The overflow width seems to vary in different browsers. How do I make the content to exactly fill the width of the `div`?
Content of div is longer then div itself when width is set to 100%?
CC BY-SA 2.5
0
2011-03-07T11:19:23.867
2014-10-13T15:24:29.273
2011-03-07T11:22:05.393
405,015
311,865
[ "html", "css", "firefox" ]
5,219,313
1
5,219,908
null
1
1,486
I currently have 3 controllers, `AdministratorController.php`, `ResellerController.php` and `ServiceProviderController.php`. Each of these have their own actions and views. For instance, `AdministratorController.php` has the views: ![enter image description here](https://i.stack.imgur.com/Jo0CT.png) Each of these controllers' views will have exactly the same layout - the only difference in layout being different navigational menus. So my question is, how I can configure different navigational menus for controllers, but using the same layout? Many thanks
Different Navigation Menus for Controller Views - Zend Framework
CC BY-SA 2.5
null
2011-03-07T11:47:42.047
2011-03-30T23:44:02.077
2011-03-30T23:44:02.077
168,868
484,099
[ "php", "zend-framework", "zend-navigation" ]
5,219,429
1
5,220,282
null
0
463
I am porting a jQtouch app to use JQMobile instead. Most of it is moving across fine but there are a couple of bits im having a problem with. 1) in JqTouch i was using ``` $("#approveRequests").bind('pageAnimationEnd', function () { getRequestList(); return false; }); ``` to load data when a particular page ( a div in a single html document ) is displayed. I could not get the event working so I decided to move markup from my single index.aspx document into smaller seperate documents. I tried changing this to: ``` $("#approveRequests").live('pageShow', testMethod); ``` but the event seems to fire as soon as the page loads rather than when the div is displayed 2) after moving the markup for one of the divs in to a seperate page I cant get the app to navigate to it. It just pops up a loading dialog and never does anything. Here is the markup to create the menu: ``` <div data-role="content"> <a href="RequestsMaster.aspx" data-role="button">Requests</a> <a href="#invoices" data-role="button">Invoices</a> <a href="#expenses" data-role="button">Expenses</a> <a href="#timesheets" data-role="button">Timesheets</a> <a href="#holidays" data-role="button"> Holidays</a> <a href="#about" data-role="button">About</a> <a href="#logout" data-role="button" data-theme="e" button-icon="delete">Log out</a> </div> ``` The line im having the problem with is : ``` <a href="RequestsMaster.aspx" data-role="button">Requests</a> ``` The page is in the same folder as the Index.aspx Is there anything else you need to know? ![enter image description here](https://i.stack.imgur.com/AYOTi.png) This is where its stuck
jQuery Mobile navigate to alternate aspx
CC BY-SA 2.5
null
2011-03-07T11:58:33.270
2011-03-07T13:28:48.643
null
null
428,404
[ "jquery", "asp.net", "jquery-mobile" ]
5,219,502
1
null
null
0
47
How can this be done? ``` SELECT d.id, d.dealTitle, d.expiryDate, d.dealMainImage, d.actualPrice, d.discount, d.offerValue, d.maxBuy, sum( sc.quantity ) AS totalDealsBought FROM deal AS d LEFT JOIN shoppingcart AS sc ON sc.dealID = d.id WHERE CURDATE( ) != d.startDate AND d.startDate < CURDATE( ) AND d.status = 'Active' AND d.cities = 'chennai' AND sc.paymentStatus = 'paid' GROUP BY d.id ``` ![enter image description here](https://i.stack.imgur.com/n1kaN.jpg) Thanks in advance.
mysql query alteration
CC BY-SA 2.5
null
2011-03-07T12:06:07.277
2011-03-07T12:31:00.790
null
null
154,137
[ "mysql" ]
5,219,543
1
5,243,103
null
0
334
When using the Sitecore Cache Admin tool (.../sitecore/admin/cache.aspx) to view the caches I have Standard holders listed. What is the purpose of that particular cache and more important, how do I change the size of that cache. The Sitecore version is 5.3.2 (rev. 090317). ![Screen dump of the cache listing](https://i.stack.imgur.com/qf0jm.png)
How to change the Size of the Sitecore Standard holders cache
CC BY-SA 2.5
null
2011-03-07T12:10:04.263
2011-03-09T12:28:30.063
2011-03-09T12:28:30.063
549,619
549,619
[ "sitecore" ]
5,219,647
1
null
null
0
588
I'd like to do the following with HTML5 / CSS3 (full browser compliance would be nice, but not totally necessary - I'm testing with firefox 4b12, safari and chrome so far): I have the following html structure: ``` <div id=contentwrapper> <aside> <div id=child1></div> <div id=child2></div> </aside> (<div id=maincontent></div>) </div> ``` What I want to do is the following: contentwrapper is set position fixed, top 20, bottom 20px (= use all space between a fixed header and footer). aside is set to 100% height (use all space of content wrapper!) child1 has variable content (potentially changed by CSS- or DOM manipulation by user interaction), so it's height is set to auto to adjust it's height accordingly. child2 has also variable content. but I want this div to use all available vertical space that is left within the aside and that is not occupied by child1. If it's content needs more space, there is a overflow:auto to make a scrollbar if necessary. The whole column is followed by a main content area that is floated right. this should not be relevant to my problem though. what I tried so far: I can't set child2's height to auto or 100% or a fixed value (could be to large, no scrollbar, don't know users window height, ...). I can't use position:fixed and top+bottom values, as this does not looks at child1, but renders relatively to aside. I can't use display:table, as the elements do have borders/formattings that don't apply to table cells. I hope you understand the problem, and maybe have a smart solution ... Edit: here is a screenshot of my problem: ![http://www.gestaltungssache.at/stuff/beschreibungproblem.png](https://i.stack.imgur.com/WotMT.png) In view 1 you can see what happens at the moment when viewport is high enough. In view 2, there is not enough space, and child2 slides down under the footer ... what I'd like is to that child2 takes all it can get in height, but scrolls its content. thanks for your help sebastian
child#2 div adjusting to available vertical space, depending on child#1's height
CC BY-SA 3.0
0
2011-03-07T12:19:14.197
2011-11-27T07:49:19.310
2011-11-27T07:49:19.310
234,976
648,127
[ "html", "css", "height", "fluid" ]
5,219,731
1
5,225,655
null
4
1,478
I'm looking for some freeware Query Builder. Query Builder in Aqua Data Studio allows you to visually build queries: 1. select the column you want returned 2. generates joins for you(you just select by which columns you want to join it) ![enter image description here](https://i.stack.imgur.com/FvrZ6.jpg)
Freeware Query Builder
CC BY-SA 2.5
0
2011-03-07T12:29:36.530
2019-10-13T21:17:23.050
2019-10-13T21:17:23.050
3,002,139
30,453
[ "sql", "database" ]
5,219,798
1
5,226,724
null
3
3,770
I am working on java, spring web based project where i want to integrate PayPal using Website Payments Pro. enables you to accept both debit and credit cards directly from your sit. (using without pay pal account) enables you to accept payments from PayPal accounts in addition to debit and credit cards. Any work tutorials for above both implementions ? ![enter image description here](https://i.stack.imgur.com/RCoWc.png)
Java paypal integeration (Website Payments Pro)
CC BY-SA 2.5
0
2011-03-07T12:37:46.940
2011-03-07T23:44:03.060
2011-03-07T12:53:46.557
216,431
216,431
[ "java", "paypal", "website-payment-pro" ]
5,220,253
1
null
null
10
13,138
The ExtJS code below creates two regions to the left and right of each other, like this: ![enter image description here](https://i.stack.imgur.com/ScsO2.png) ``` <script type="text/javascript"> var template_topbottom_top = new Ext.Panel({ frame: false, border: false, header: false, items: [] }); var template_topbottom_bottom = new Ext.Panel({ frame: false, border: false, header: false, items: [] }); var template_topbottom = new Ext.Panel({ id:'template_topbottom', baseCls:'x-plain', renderTo: Ext.getBody(), layout:'table', layoutConfig: {columns:2}, defaults: { frame:true, style: 'margin: 10px 0 0 10px; vertical-align: top' //doesn't work }, items:[{ width: 210, height: 300, frame: false, border: true, header: false, items: [template_topbottom_top] },{ width: 1210, height: 200, frame: false, border: true, header: false, items: [template_topbottom_bottom] } ] }); replaceComponentContent(targetRegion, template_topbottom, true); </script> ```
How do I top align two areas in an ExtJS table layout?
CC BY-SA 2.5
0
2011-03-07T13:25:33.103
2017-06-27T08:58:28.630
2017-06-27T08:58:28.630
4,370,109
4,639
[ "javascript", "extjs" ]
5,220,283
1
5,222,607
null
3
3,609
I recently started using R language and now i am using R for most of my 2d plots. Now, I want to use R for generating 3d plots. I have x, y, z data coming from a tool, till now i was using splot in gnuplot to generate a surface plot. I want to use R for generating a surface plot similar to the one splot in gnuplot gives. Problem i see is, to generate a 3d plot R requires data to be in matrix format but my data is not in that format. My question is, if gnuplot is able to generate a plot from the data why R cant do it. I am sure i am missing something, please help me Here is the plot from gnuplot ![Surface plot from GNU plot](https://i.stack.imgur.com/PBZY0.jpg) This is the data ``` 17.46 537.74 0.8 18.36 537.74 1.6 19.26 537.74 1.3 19.395 537.74 1.7 21.015 537.74 1.9 35.46 475.26 1.2 36.36 475.26 0.8 37.395 475.26 0.9 39.96 475.26 0.6 43.56 475.26 1 ```
Surface plot in R similar to the one from gnuplot
CC BY-SA 2.5
0
2011-03-07T13:29:15.617
2011-03-08T07:15:23.393
2011-03-07T16:16:57.890
553,766
553,766
[ "r", "gnuplot" ]
5,220,603
1
5,220,646
null
0
193
![enter image description here](https://i.stack.imgur.com/Lcgr0.gif) ``` $flag=0; if($q->num_rows > 0) : echo '<div id="testimonial">'; while($r = $q->fetch_array(MYSQLI_ASSOC)) : if($flag=0) : $class=test1; $flag=1; else : $class=test2; $flag=0; endif; echo '<div class="'.$class.'">'; echo '<span class="left">'; echo '<p>'.$r['compname'].'</p>'; echo '<p>'.$r['position'].'</p>'; echo '</span>'; echo '<span class="right">'; echo '<p>'.$r['testimonial'].'</p>'; echo '</span>'; echo '</div>'; endwhile; echo '</div>'; else : echo '<h1>Coming Soon</h1>'; endif; ``` i want the result look like the picture! seems my php code doesnt work out the css class. its only showing 1 class `test1` when i echoing the result. so all the result left align.
divide php mysql result left and right
CC BY-SA 2.5
null
2011-03-07T14:03:16.440
2011-03-07T14:47:38.850
null
null
551,559
[ "php", "css", "while-loop" ]
5,220,743
1
5,239,010
null
8
3,722
![This image is the one I am getting after defining classes for ontology](https://i.stack.imgur.com/niDvv.png)I have created a basic Class hierarchy for my ontology in Protege-OWL Editor version 4.1. But I am not able to visualise Object Properties and relations between the classes in OwlViz other than the normal hierarchy or "is-a" relationship. So please tell me how to display "object properties" using OwlViz or OntoGraf ? or do I need to make some modifications in corresponding owl/xml file ?
Displaying Relations in Protege-OWL Editor
CC BY-SA 2.5
0
2011-03-07T14:16:49.973
2021-03-19T11:29:08.663
2011-03-08T14:51:44.453
580,262
580,262
[ "xml", "semantic-web", "owl", "protege" ]
5,221,017
1
5,232,007
null
5
30,356
I have this interface to create. I have a problem with the JScrollPane: ![enter image description here](https://i.stack.imgur.com/gJ6GU.png) I declared a JPanel with a Gridlayout(8,1,0,2), I want 8 rows appear in this panel. A row is a JPanel to, I set the size to make the 8 row panels appear in the big panel. If the number of rows pass 8, I get two columns ... I added a JScrollPane but it doesn't appear. Testing button at the place of button, the scrollpane appear but returning to panel it disappear.. How can I do ??
Add JScrollPane to a JPanel
CC BY-SA 2.5
0
2011-03-07T14:42:29.620
2013-05-07T18:43:30.903
2011-03-07T15:14:04.580
253,056
604,156
[ "jpanel", "add", "jscrollpane" ]
5,221,065
1
5,246,952
null
0
290
![enter image description here](https://i.stack.imgur.com/EYOAt.png) I am getting this error after including Omniture library. I am not able to find "RegexKitLite", but it seems as if it is refrenced inside the omniture library. I have set `other linker flags` and `library search path`, but still the problem persists. This error does not come when I use `libOmnitureAppMeasurement-iPhoneSimulator.a`, it only comes when I use `libOmnitureAppMeasurement-iPhoneDevice` What could be wrong?
Linker error while including omniture library
CC BY-SA 2.5
null
2011-03-07T14:47:48.500
2011-03-09T14:09:20.060
null
null
566,431
[ "iphone", "objective-c", "cocoa-touch", "ios", "ios4" ]
5,221,150
1
5,250,170
null
3
12,906
Why am I getting this error: ``` Uncaught SyntaxError: Unexpected token < c.b.extend.globalEval jquery-1.4.4.min.js:32 c.extend.httpData jquery-1.4.4.min.js:144 c.extend.ajax.L.w.onreadystatechange jquery-1.4.4.min.js:140 ``` This error doesn't point me to a place in my JS that is triggering this issue. Just the jQuery min file. How do I debug this and fix it ? Edit1: Here are some screenshots of my call stack around this error. Still not sure though, which file has the syntax error that is being called by jQuery. ![enter image description here](https://i.stack.imgur.com/r6VBL.png) ![enter image description here](https://i.stack.imgur.com/tYOXW.png) ![enter image description here](https://i.stack.imgur.com/1RVm8.png) Edit 2: Here are some of my AJAX calls: ``` $('form#project-ajax-form').submit(function(){ if(compv.steps.selectedClient.id != null){ $('input#project_client_id').val(compv.steps.selectedClient.id); console.debug("Project Client Value: " + $('input#project_client_id').val()); return true; } console.debug("Project Client Value not found"); compv.tools.clientError(); return false; }); $('#project-ajax-form') .bind("ajax:success", function(evt, data, status, xhr){ compv.updateStepView('project', xhr); }); $('#client-ajax-form') .bind("ajax:success", function(evt, data, status, xhr){ console.log("Calling Step View"); compv.updateStepView('client', xhr); }); $('form#stage-ajax-form').submit(function(){ if(compv.steps.selectedProject.id != null){ $('input#stage_project_id').val(compv.steps.selectedProject.id); console.debug("Stage Project Value: " + $('input#stage_project_id').val()); return true; } console.debug("Stage Project Value not found"); compv.tools.clientError(); return false; }); $('#stage-ajax-form') .bind("ajax:success", function(evt, data, status, xhr){ compv.updateStepView('stage', xhr); }); $.ajaxSetup({ beforeSend: function(xhr) { xhr.setRequestHeader("Accept", "text/javascript"); } }); $('.ajax-form') .bind("ajax:success", function(evt, data, status, xhr){ var $form = $(this); console.log("Form Success: %s", $(this).attr('id')); // Reset fields and any validation errors, so form can be used again, but leave hidden_field values intact. $form.find('textarea,input[type="text"],input[type="file"]').val(""); $form.find('div.validation-error').empty(); }) .bind("ajax:failure", function(evt, xhr, status, error){ var $form = $(this), errors, errorText; console.log("Form Failure: %s", $(this).attr('id')); try { // Populate errorText with the comment errors errors = $.parseJSON(xhr.responseText); } catch(err) { // If the responseText is not valid JSON (like if a 500 exception was thrown), populate errors with a generic error message. console.error("Server Error for Form: %s", $(this).attr('id')); errors = {"Server Error": "Please reload the page and try again"}; } // Build an unordered list from the list of errors errorText = "There were errors: \n<ul>"; for ( error in errors ) { errorText += "<li>" + error + ': ' + errors[error] + "</li> "; } errorText += "</ul>"; // Insert error list into form var errorDiv = $form.find("div.validation-error"); errorDiv.html(errorText); errorDiv.show(300); }); ```
Why am I getting an unexpected token error in jQuery 1.4.4.min file?
CC BY-SA 2.5
null
2011-03-07T14:57:54.497
2011-03-09T18:05:45.657
2011-03-07T16:33:04.550
91,970
91,970
[ "jquery" ]
5,221,251
1
5,222,011
null
1
697
What would be the best way to model 1 table with multiple 1 to many relatiionships. ![enter image description here](https://i.stack.imgur.com/iNDVf.jpg) With the above schema if Report contains 1 row, Grant 2 rows and Donation 12. When I join the three together I end up with a Cartesian product and result set of 24. Report joins to Grant and creates 2 rows, then Donation joins on that to make 24 rows. Is there a better way to model this to avoid the caresian product? example code ``` DECLARE @Report TABLE ( ReportID INT, Name VARCHAR(50) ) INSERT INTO @Report ( ReportID, Name ) SELECT 1,'Report1' DECLARE @Grant TABLE ( GrantID INT IDENTITY(1,1) PRIMARY KEY(GrantID), GrantMaker VARCHAR(50), Amount DECIMAL(10,2), ReportID INT ) INSERT INTO @Grant ( GrantMaker, Amount, ReportID ) SELECT 'Grantmaker1',10,1 UNION ALL SELECT 'Grantmaker2',999,1 DECLARE @Donation TABLE ( DonationID INT IDENTITY(1,1) PRIMARY KEY(DonationID), DonationMaker VARCHAR(50), Amount DECIMAL(10,2), ReportID INT ) INSERT INTO @Donation ( DonationMaker, Amount, ReportID ) SELECT 'Grantmaker1',10,1 UNION ALL SELECT 'Grantmaker2',3434,1 UNION ALL SELECT 'Grantmaker3',45645,1 UNION ALL SELECT 'Grantmaker4',3,1 UNION ALL SELECT 'Grantmaker5',34,1 UNION ALL SELECT 'Grantmaker6',23,1 UNION ALL SELECT 'Grantmaker7',67,1 UNION ALL SELECT 'Grantmaker8',78,1 UNION ALL SELECT 'Grantmaker9',98,1 UNION ALL SELECT 'Grantmaker10',43,1 UNION ALL SELECT 'Grantmaker11',107,1 UNION ALL SELECT 'Grantmaker12',111,1 SELECT * FROM @Report r INNER JOIN @Grant g ON r.ReportID = g.ReportID INNER JOIN @Donation d ON r.ReportID = d.ReportID ``` Cheers for the feedback so far, to add to this scenario there are also 15 other 1 to many relationships coming from the one report table. These tables can't for various business reasons be grouped together.
Database design - Multiple 1 to many relationships
CC BY-SA 2.5
null
2011-03-07T15:08:27.423
2011-03-07T16:15:12.700
2011-03-07T15:20:52.333
402,426
402,426
[ "sql", "database", "database-design", "database-schema", "schema-design" ]
5,221,270
1
5,221,339
null
0
829
I'm making my own forum software. Well its normal to have smileys in your forum. So i made an array with all the smileys and putted them in a function: ``` function si_ubb($string){ $smileys = array( '0<:)' => 'angelnot.gif', '>:(' => 'angry.gif', ':@' => 'blush.gif', ':*' => 'cencored.png', ':?' => 'confused.gif', ';(' => 'cry.png', ':D' => 'grin.gif', ':)' => 'happy.gif', ':|' => 'hmm.png', '0:)' => 'hypocrite.gif', ':x:' => 'lock.gif', '<3' => 'love.gif', '8)' => 'rolleyes.gif', ':(' => 'sad.png', '|)' => 'shifty.gif', 'O_o' => 'shock.gif', '8)' => 'sunglasses.gif', '^_^' => 'sweatingbullets.gif', ':p' => 'tongue.gif', ':P' => 'tongue.gif', ';)' => 'wink.gif', '>.<' => 'wry.gif', 'XD' => 'wry.gif', 'xD' => 'wry.gif' ); foreach($smileys as $code => $image){ $string = str_replace($code, $image, $string); } return $string; } ``` But, ehm, when i do this now: `echo si_ubb('0<:)');` It gives this? 0<![Image](https://i.stack.imgur.com/0D9dk.gif) But how? And why? Why isn't it showing the right smiley? Greetings
str_replace does not replace all the keys?
CC BY-SA 2.5
null
2011-03-07T15:10:11.537
2011-03-07T16:03:07.880
null
null
528,370
[ "php", "str-replace" ]
5,221,283
1
5,221,465
null
9
17,485
I want to create a 3d scatter plot of spheres with their color being the fourth dimension. I have the data in a csv file where each line indicates the x,y,z position of a particle and I have a column which tells me the value of the particle (1,2 or 3). I want to color the balls in one color if their value is 1 or in another color otherwise. # Edit: I created the following code: ``` library(rgl) m <- read.csv(file="mem0.csv", sep = ",", head=TRUE) mcol = m$val i = 1 mdim = dim(m) while (i <= mdim[1] ){ if (mcol[i] == 1){ mcol[i] = "red" }else { mcol[i] = "blue" } i = i +1 } plot3d(m$x, m$y, m$z, col = mcol, type='s', size=0.1) ``` # Edit number 2: I use the rgl.snapshot() to export to an svg file: ![a snapshot of my rgl.shanpshot](https://i.stack.imgur.com/JAMih.png) The data should display a layer of red balls, 4 layers of blue balls and a layer of red balls again.
3d scatterplot with colored spheres with R and Rgl
CC BY-SA 4.0
0
2011-03-07T15:11:14.440
2018-05-15T17:25:57.703
2018-05-15T17:25:57.703
3,848,765
596,691
[ "r", "plot", "rgl" ]
5,221,290
1
5,221,382
null
8
1,371
I'm trying to use the [Midpoint Displacement Algorithm](http://www.gameprogrammer.com/fractal.html) using JavaScript and `canvas` as recommended on [gamedev.stackexchange.com](https://gamedev.stackexchange.com/questions/9384/how-do-i-generate-terrain-like-that-of-scorched-earth/9386#9386). The code below generates points where the array index is the `x` position and its value is the `y` position. ``` var createTerrain = function(chops, range) { chops = chops || 2; range = parseInt(range || 100); if (chops > 8) return; var cycle = parseInt(width / chops); for (var i = 0; i <= width; i += cycle) { var y = (height / 2) + getRandomNumber(-range, range); terrain[i] = y; } chops *= 2; range *= 0.5; createTerrain(chops, range); } ``` `getRandomNumber()`'s arguments are `min` and `max`. `width` and `height` are respective of the `canvas`. This produces something like... ![Canvas](https://i.stack.imgur.com/sJ4YQ.png) It seems pretty choppy, but that may just be how it is. Have I got this algorithm right? If not, what is wrong, and can you point me in the right direction?
Does this JavaScript code follow the Midpoint Displacement algorithm?
CC BY-SA 2.5
0
2011-03-07T15:11:59.900
2011-04-15T12:43:21.040
2017-04-13T12:18:41.790
-1
31,671
[ "javascript", "canvas" ]
5,221,556
1
5,311,869
null
8
3,759
Here is the problem. I have rectangular canvas that have size of 1. So it have coordinate sistem of (0.0 ... 1.0 - x and 0.0 ... 1.0 - y). I also have some tiles. Tiles are also rectangles. They have diffrent size and amount of tiles is a variable. I want to tiles in rectangular canvas, from 0.0 to 1.0 (): 1) tiles have to fit in canvas (but fill as much space as they could) 2) tiles have to be scaled (if they don't fit), each tile should be scaled by the same amount (they have to remain same proportions). 3) imagine that you have this 'tiles' in your hand, and you placing them into this canvas one after another 4) it almost like but - shape of tiles have to be the same () and of canvas ![here is what i want to get](https://i.stack.imgur.com/CJWek.png) *I tried this. 1) i calculated area of tile, then i calculate a sum of tile's areas (for example: i have two tiles, one have area of 2, other area of 1, them it's mean i have total sum of 3) 2) then i calculate what "proportion" each tile have in "total sum of areas" (for example: 2/3 and 1/3) 3) then calculate size of rectangle tile by Math.sqrt(x) (for example: Math.sqrt(2/3)) 4) then draw tile one by one... But this dosen't work always. Sometimes i get tiles to be out of canvas..*
Tile (scalable) stacking algorithm
CC BY-SA 2.5
0
2011-03-07T15:33:54.523
2011-03-15T18:58:05.000
2011-03-15T18:58:05.000
474,290
474,290
[ "algorithm", "tiles", "rectangles" ]
5,221,601
1
5,221,710
null
3
7,882
Here is how it looks now: ![Combobox with large items](https://i.stack.imgur.com/qAird.png) I want the `ComboBoxItem`s to have the same width as the `ComboBox`. I've overridden the default template of `ComboBox` and `ComboBoxItem`. `ComboBoxItem`s style: ``` <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}"> <Setter Property="SnapsToDevicePixels" Value="true" /> <Setter Property="OverridesDefaultStyle" Value="true" /> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ComboBoxItem}"> <Border Name="Border" Padding="2" SnapsToDevicePixels="true"> <ContentPresenter /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsHighlighted" Value="true"> <Setter TargetName="Border" Property="Background" Value="#9982B5D8" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="#888888" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> ``` `ComboBox` style: ``` <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}"> <Setter Property="SnapsToDevicePixels" Value="true" /> <Setter Property="OverridesDefaultStyle" Value="true" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.CanContentScroll" Value="true" /> <Setter Property="MinHeight" Value="20" /> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ComboBox}"> <Border x:Name="comboBoxBorder" BorderThickness="1" BorderBrush="Transparent"> <Grid d:DesignWidth="250.25" d:DesignHeight="24.75"> <ToggleButton Name="ToggleButton" Template="{StaticResource ComboBoxToggleButton}" Grid.Column="2" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"> </ToggleButton> <ContentPresenter Name="ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Margin="3,3,23,3" VerticalAlignment="Center" HorizontalAlignment="Left" /> <TextBox x:Name="PART_EditableTextBox" Style="{x:Null}" Template="{StaticResource ComboBoxTextBox}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3,3,23,3" Focusable="True" Background="Transparent" Visibility="Hidden" IsReadOnly="{TemplateBinding IsReadOnly}" /> <Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide"> <Grid Name="DropDown" SnapsToDevicePixels="True" MinWidth="{Binding ElementName=ToggleButton, Path=ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}"> <Border x:Name="DropDownBorder" Background="#FFFFFF" BorderThickness="0.5" BorderBrush="#FF1B75BB" /> <ScrollViewer x:Name="PopupItemsScrollViewer" Margin="1,1,0,0.5" CanContentScroll="False" SnapsToDevicePixels="True"> <ItemsPresenter /> </ScrollViewer> </Grid> </Popup> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="HasItems" Value="false"> <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="#888888" /> <Setter Property="IsEnabled" TargetName="ToggleButton" Value="False" /> </Trigger> <Trigger Property="IsGrouping" Value="true"> <Setter Property="ScrollViewer.CanContentScroll" Value="false" /> </Trigger> <Trigger SourceName="Popup" Property="AllowsTransparency" Value="true" /> <Trigger Property="IsEditable" Value="true"> <Setter Property="IsTabStop" Value="false" /> <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" /> <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden" /> </Trigger> <Trigger Property="IsFocused" Value="True"> <Setter TargetName="comboBoxBorder" Property="BorderBrush" Value="{StaticResource ComboBoxDropdownButtonBackgroundBrush}" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> ``` `ComboBoxToggleButton` style: ``` <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}"> <Grid x:Name="grid" d:DesignWidth="243.25" d:DesignHeight="20.667"> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="20" /> </Grid.ColumnDefinitions> <Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="0,0,0,0" Background="{DynamicResource ComboBoxDropdownButtonBackgroundBrush}" BorderBrush="#FF6CA1CB" BorderThickness="0,0,0,0" Margin="0,0,0,0" /> <Border x:Name="BlankSpaceBorder" Grid.Column="0" CornerRadius="0,0,0,0" Margin="0,0,0,0" Background="#FFFFFF" BorderThickness="0.5,0.5,0,0.5" BorderBrush="{DynamicResource ComboBoxToggleButtonNormalBorderBrush}"> </Border> <Grid x:Name="grid1" Grid.Column="1"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Path x:Name="path" Grid.Column="0" Fill="#FFFFFFFF" Stretch="Fill" Width="11.49" Height="5.744" Data="F1M759.5938,228.6523L765.3408,234.3963L771.0838,228.6523z" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" d:LayoutOverrides="Height" Grid.RowSpan="2" /> <Path Fill="#FFAEDEE4" Stretch="Fill" Width="19.996" Opacity="0.19999699294567108" Data="F1M774.4961,229.3877L774.4961,220.7157L754.5001,220.7157L754.5001,231.1477C760.2531,229.2797,765.2251,227.7837,774.4961,229.3877" HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Stretch" Grid.Column="0" /> </Grid> </Grid> <ControlTemplate.Triggers> <Trigger Property="ToggleButton.IsMouseOver" Value="true"> <Setter Property="BorderBrush" TargetName="BlankSpaceBorder"> <Setter.Value> <SolidColorBrush Color="#FF1B75BB" /> </Setter.Value> </Setter> <Setter Property="BorderBrush" TargetName="Border" Value="#FF1B75BB" /> <Setter Property="Fill" TargetName="path" Value="{DynamicResource ComboBoxToggleButtonMouseOverArrowFill}" /> <Setter Property="Background" TargetName="Border" Value="White" /> <Setter Property="BorderThickness" TargetName="Border" Value="0,0.5,0.5,0.5" /> <Setter Property="Margin" TargetName="grid1" Value="0,0.5,0.5,0" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Opacity" TargetName="grid" Value="0.25" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> ``` XAML Usage: ``` <ComboBox x:Name="ModesComboBox" IsEditable="False" ItemsSource="{Binding ModesCollection}" SelectedIndex="{Binding CurrentMode}" ToolTip="{Binding SelectedItem.Name,RelativeSource={RelativeSource Self}}" HorizontalAlignment="Stretch" VerticalContentAlignment="Top"> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Name}" TextTrimming="CharacterEllipsis" MaxWidth="{Binding ElementName=BlankSpaceBorder, Path=ActualWidth}"> </TextBlock> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> ``` I just want to set this `MaxWidth` to an appropriate value ... Ideas ? I also tried setting the `MaxWidth` of the `ComboboxItem` to the `ComoboBox`'s width but in that case the `ScrollViewer` appears after the `ComoboBox` as follows: ![Extended Scrollbar](https://i.stack.imgur.com/HiC5t.png) Actually this is how it appears right now, earlier code was what I was trying to modify.
Setting MaxWidth of ComboboxItem such that Items width don't exceed ComboboxWidth
CC BY-SA 3.0
0
2011-03-07T15:38:02.457
2011-08-12T18:19:59.943
2011-08-12T18:19:59.943
305,637
351,708
[ "wpf", "templates", "combobox", "styles", "controltemplate" ]
5,221,725
1
5,222,390
null
9
11,018
I need get intersection point of rectangle and line. I have point B inside rectangle(center of rectangle) and have point A outside. And i need to find point C on one of rectangle borders. Also I get width and height of rectangle. ![enter image description here](https://i.stack.imgur.com/zi8i8.png) All this will be application, so if any build in functions i will be very happy.
Get intersection point of rectangle and line
CC BY-SA 2.5
0
2011-03-07T15:48:37.073
2021-06-05T05:32:04.483
2011-03-07T16:10:17.173
353,410
508,330
[ "c#", "wpf", "math" ]
5,221,895
1
5,221,965
null
2
9,168
I'm using VB.NET and the .NET 3.5 framework. I am trying to automate word and excel using their respective PIAs to get intellisense help, then (since the users don't have the PIA assemblies/DLLs installed) remove the references so that it will work as a COM object call without throwing an error. I found this article: [http://msdn.microsoft.com/en-us/library/15s06t57.aspx](http://msdn.microsoft.com/en-us/library/15s06t57.aspx) but it doesn't really help me with what version of the assembly/DLL I should use. When I go to add a reference I see something like these: ![first pane](https://i.stack.imgur.com/OLZFj.png) then ![Second pane](https://i.stack.imgur.com/qreyN.png) then ![third pane](https://i.stack.imgur.com/pqvFD.png) Notice all of these highlighted ones all sound similar and there are multiple versions of the assembly. The link I started with suggests the name of the DLL in association to the product version (like WORD version 12 --- Microsoft.Office.Interop.Word.dll) but doesn't say what of the PIA assembly. So And a better question: why is this not somewhere? All I want is Microsoft to say "hey, you want to automate a mail merge with Word 2007? Use [insert meaningful DLL name here (PIA or "tools" assembly?)]. By the way, you can get that DLL here ["here" hyper-linked to the download I need]. Working with computers that may have 2007 or 2010 installed? Make sure you have both DLLs (if that is the case), and here is how you test for it: [insert helpful example]. (e.g. "For Word 14 (i.e. Word 2010), use the Microsoft.Office.Interop.Word DLL version 12.0.0.0" (is this the case? I don't know.)) , and it does not appear to be so. Maybe it obvious? Is the version of the DLL the same as the version of the program? (i.e. Microsoft.Office.Interop.Word DLL version 12.0.0.0 =?= WORD version 12) Maybe I am over-thinking this, but it is still not obvious to me. I'll be happy if you can answer the first question, but if you can explain both, that would be better.
Which Microsoft Word (and Excel) Interop Assembly or DLL Should I Reference?
CC BY-SA 2.5
null
2011-03-07T16:04:41.700
2015-02-25T00:48:55.443
2015-02-25T00:48:55.443
3,204,551
88,257
[ ".net", "excel", "dll", "ms-word", "automation" ]
5,222,397
1
5,234,491
null
1
453
I have come across an odd problem using 'Helvetica Neue W01 97 Black Cn' @font-face font from [webfonts.fonts.com](http://webfonts.fonts.com) When used in Windows based browsers (tested FF and IE), in this case in a submit button, the text seems to acquire an extra 4px or so of padding (see ff-pc-style.png). In the case of my current design, this centers it perfectly in the submit box. In OS X, across Firefox, Safari, Chrome and Opera, the padding is lost, yet an extra 0.4px is added to the line height and height (see ff-pc-style.png). If I remove the custom font, the fallback font (Arial), appears properly centered in OS X. Why does this occur? And how would I get round it? Platform detection seems like overkill just to fix a font ... --- ## ff-pc-style.png ![ff-pc-style.png](https://i.stack.imgur.com/aFn6e.png) ## ff-pc-style.png ![ff-pc-style.png](https://i.stack.imgur.com/fXhc7.png)
@font-face font gains padding in Windows
CC BY-SA 2.5
null
2011-03-07T16:43:46.820
2011-03-08T15:36:23.057
2011-03-08T15:36:23.057
161,525
161,525
[ "css", "cross-platform", "font-face" ]
5,222,523
1
5,222,570
null
61
464,556
I want to develop some kind of utility bar. I can position each element in this bar side by side using `float:left;` But I want the second element to be positioned at the very right of the bar. This is hard for me because the width of the bar is not static. Have a look at my demo: [http://jsfiddle.net/x5vyC/2/](http://jsfiddle.net/x5vyC/2/) It should look like this: ![enter image description here](https://i.stack.imgur.com/abQqH.png) Any idea how to achieve this using css?
Position a div container on the right side
CC BY-SA 2.5
0
2011-03-07T16:53:34.270
2022-02-02T11:35:14.170
null
null
401,025
[ "css" ]
5,222,610
1
5,230,386
null
3
3,809
Is there any real help out there on how to extend the aloha editor? What I am trying to do is extend their floating menu- I want to add a drop down list with custom fields. For instance, if a user selects a custom field then a label is added into the html and something like: `<special_field>` appears inside the content editable. my code for the initialization part of the plugin so far... ``` EXAMPLE.Product.init = function() { var that = this; // floating menu "Insert template field"-button var insertButton = new GENTICS.Aloha.ui.Button({ label: 'template field', 'size': 'small', 'onclick': function() { that.insertfield(); }, 'tooltip': this.i18n('button.insertfield'), 'toggle': false }); GENTICS.Aloha.FloatingMenu.addButton( 'GENTICS.Aloha.continuoustext', insertButton, GENTICS.Aloha.i18n(GENTICS.Aloha, 'floatingmenu.tab.insert'), 2 ); // product scope & product attribute field GENTICS.Aloha.FloatingMenu.createScope(this.getUID('product'), 'GENTICS.Aloha.global'); this.productField = new GENTICS.Aloha.ui.AttributeField(); //style for the drop down that appears when user searches for a fieldname this.productField.setTemplate('<span><b>{name}</b>' + '<br class="clear" /><i>{type}</i></span>'); // set the type of field that are allowed to be visible of field search this.productField.setObjectTypeFilter(['specialfield','systemfield']); this.productField.setDisplayField('name'); GENTICS.Aloha.FloatingMenu.addButton( this.getUID('product'), this.productField, this.i18n('floatingmenu.tab.specialfield'), 1 ); // handle event as soon as a product block is clicked GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha, 'selectionChanged', function(event, rangeObject) { var foundMarkup = that.findProduct(rangeObject); jQuery('.product-selected').removeClass('product-selected'); if (foundMarkup.length != 0) { GENTICS.Aloha.FloatingMenu.setScope(that.getUID('product')); that.productField.setTargetObject(foundMarkup, 'data-field-name'); foundMarkup.addClass('product-selected'); } // re-layout the Floating Menu GENTICS.Aloha.FloatingMenu.doLayout(); }); GENTICS.Aloha.EventRegistry.subscribe( GENTICS.Aloha, "editableDeactivated", function(jEvent, aEvent) { jQuery('.product-selected').removeClass('product-selected'); } ); ``` This only adds one field to the editor, then I must click on the field itself to change it to the correct field type. ``` /** * insert a template field at the cursor position */ function SetupButton(button) { var scope = 'GENTICS.Aloha.continuoustext'; var definefield = '<label class="ui-specialfield" data-field-name="{0}" data-field-type="{1}" contentEditable="false">[{2}]</label>'; // floating menu "Insert template field"-button var insertButton = new GENTICS.Aloha.ui.Button({ label: button.Name.substring(0, 11), //truncate fields to enable easy viewing for now size: 'small', onclick: function() { console.debug(" field: " + button); var range = GENTICS.Aloha.Selection.getRangeObject(); definefield = definefield.replace("{0}", button.Name); definefield = definefield.replace("{1}", button.Type); definefield = definefield.replace("{2}", button.Name); var newTemplate = jQuery(definefield); GENTICS.Utils.Dom.insertIntoDOM(newTemplate, range, jQuery(GENTICS.Aloha.activeEditable.obj)); range.startContainer = range.endContainer = newTemplate.contents().get(0); range.select(); }, tooltip: button.Name, toggle: false }); switch (button.Type) { case "sfield": GENTICS.Aloha.FloatingMenu.addButton(scope, insertButton, button.Type, 1); break; case "pfield": GENTICS.Aloha.FloatingMenu.addButton(scope, insertButton, button.Type, 1); break; case "afield": GENTICS.Aloha.FloatingMenu.addButton(scope, insertButton, button.Type, 1); break; case "cfield": GENTICS.Aloha.FloatingMenu.addButton(scope, insertButton, button.Type, 1); break; default: break; } } ``` I will look into your code reply as soon as I can with updated code... As you can see the buttons overflow... something else you may notice is the pin cannot be seen clearly if there are many tabs... ![enter image description here](https://i.stack.imgur.com/YWz19.png)
Extending the format plugin for Aloha Editor
CC BY-SA 2.5
0
2011-03-07T16:59:44.597
2012-06-20T20:01:26.520
2011-04-11T09:21:11.880
475,607
475,607
[ "javascript", "jquery", "oop", "plugins", "aloha-editor" ]
5,222,677
1
5,222,703
null
0
1,451
I use this Javascript code to mark threads as favourite: ``` function fave(tid){ xmlhttp = createXHR(); if(xmlhttp){ xmlhttp.onreadystatechange = function(){ if(xmlhttp.readyState == 4 && xmlhttp.status == 200){ get("fave"+tid).innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET", "thread?act=fave&tid="+tid+"&ajax=1", true); xmlhttp.send(null); } } ``` My .htaccess file contains this line `RewriteRule ^thread/([0-9]+)? /thread?tid=$1 [L]`, which turns `/thread?tid=1234` in more pretty `/thread/1234`. With the first URL everything works fine, but `/thread/1234` causes an error. ![enter image description here](https://i.stack.imgur.com/luiYJ.jpg) Click on the underlined link returns: ![enter image description here](https://i.stack.imgur.com/j7BAt.jpg) Response HTML is a copy of a whole page! Why the same document with the only difference between `/thread?tid=1234` and `/thread/1234` URLs behaves in different ways? ``` RewriteRule ^thread/([0-9]+)? /thread?tid=$1 [L,QSA] ``` The improved .htaccess line solved the problem.
.htaccess Causes Problem With Ajax
CC BY-SA 2.5
0
2011-03-07T17:05:37.460
2011-06-07T12:13:17.557
2011-06-07T12:13:17.557
468,793
587,800
[ "php", "ajax", ".htaccess", "mod-rewrite" ]
5,222,795
1
5,223,232
null
3
4,360
I use Eclipse 3.4.2 and just installed Android SDK plugin for eclipse. But After installation when I start the eclipse, I get error message ![enter image description here](https://i.stack.imgur.com/88iKM.png) Here is what the log says ``` !SESSION 2011-03-07 11:13:53.163 ----------------------------------------------- eclipse.buildId=M20090211-1700 java.version=1.6.0_23 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.osgi 4 0 2011-03-07 11:13:53.632 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) !ENTRY org.eclipse.osgi 2 0 2011-03-07 11:13:53.647 !MESSAGE One or more bundles are not resolved because the following root constraints are not resolved: !SUBENTRY 1 org.eclipse.osgi 2 0 2011-03-07 11:13:53.647 !MESSAGE Bundle reference:file:plugins\com.android.ide.eclipse.traceview_10.0.0.v201102162101-104271.jar was not resolved. !SUBENTRY 2 com.android.ide.eclipse.traceview 2 0 2011-03-07 11:13:53.647 !MESSAGE Missing required bundle org.eclipse.core.runtime_0.0.0. !SUBENTRY 2 com.android.ide.eclipse.traceview 2 0 2011-03-07 11:13:53.647 !MESSAGE Missing required bundle org.eclipse.ui.ide_0.0.0. !SUBENTRY 2 com.android.ide.eclipse.traceview 2 0 2011-03-07 11:13:53.648 !MESSAGE Missing required bundle org.eclipse.ui_0.0.0. !SUBENTRY 2 com.android.ide.eclipse.traceview 2 0 2011-03-07 11:13:53.648 !MESSAGE Missing required bundle org.eclipse.jdt.core_0.0.0. !SUBENTRY 2 com.android.ide.eclipse.traceview 2 0 2011-03-07 11:13:53.648 !MESSAGE Missing required bundle org.eclipse.core.resources_0.0.0. !SUBENTRY 2 com.android.ide.eclipse.traceview 2 0 2011-03-07 11:13:53.648 !MESSAGE Missing required bundle org.eclipse.core.filesystem_0.0.0. !SUBENTRY 2 com.android.ide.eclipse.traceview 2 0 2011-03-07 11:13:53.648 !MESSAGE Missing required bundle org.eclipse.jdt.ui_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2011-03-07 11:13:53.648 !MESSAGE Bundle reference:file:plugins\com.android.ide.eclipse.hierarchyviewer_10.0.0.v201102162101-104271.jar was not resolved. !SUBENTRY 2 com.android.ide.eclipse.hierarchyviewer 2 0 2011-03-07 11:13:53.648 ``` Has anyone faced the same problem?
Eclipse start problem after plugin installation
CC BY-SA 2.5
null
2011-03-07T17:16:38.377
2013-06-17T04:11:55.047
null
null
203,018
[ "java", "eclipse" ]
5,222,998
1
5,887,488
null
83
67,031
I'm trying to figure out how this is done . I've tried to depict the situation: ![enter image description here](https://i.stack.imgur.com/CGKo3.png) I'm adding a `UITableView` as a subview of a `UIView`. The `UIView` responds to a tap- and `pinchGestureRecognizer`, but when doing so, the tableview stops reacting to those two gestures (it still reacts to swipes). I've made it work with the following code, but it's obviously not a nice solution and I'm sure there is a better way. This is put in the `UIView` (the superview): ``` -(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { if([super hitTest:point withEvent:event] == self) { for (id gesture in self.gestureRecognizers) { [gesture setEnabled:YES]; } return self; } for (id gesture in self.gestureRecognizers) { [gesture setEnabled:NO]; } return [self.subviews lastObject]; } ```
UIGestureRecognizer blocks subview for handling touch events
CC BY-SA 3.0
0
2011-03-07T17:32:05.610
2017-11-08T18:56:13.590
2017-11-08T18:56:13.590
4,126,683
603,014
[ "objective-c", "ios", "uiview", "uigesturerecognizer", "uiresponder" ]
5,223,056
1
5,223,131
null
1
236
![enter image description here](https://i.stack.imgur.com/Fj6y8.jpg) ![enter image description here](https://i.stack.imgur.com/DOS7f.jpg) I am trying to access my outlook account .. which results in the following error.. any help ??,
accessing outlook server in java
CC BY-SA 2.5
null
2011-03-07T17:36:32.630
2012-07-05T14:17:00.540
null
null
410,693
[ "java", "email" ]
5,223,092
1
5,223,121
null
0
200
So I've set my input, textarea and select elemtnts width of 97%. Everything is showing fine, but select element is always a bit shorter then rest. See picture for screenshot. ![enter image description here](https://i.stack.imgur.com/kWPNW.png) How to fix this? :) Okey I fixed it byt adding extra margin to select element, here is css. ``` #cat_add_form input[type="text"], #edtCatDescr, select, .fileUpload { background-color: #ffffff; width: 97%; padding: 4px; margin-bottom: 6px; font-size: 16px; border: 1px solid #dfdfdf; display: block; /* CSS 3 */ -webkit-border-radius: 3px; -moz-border-radius: 3px; } #cat_add_form select { margin-left: 10px; } ```
<select> element is a bit shorter then rest
CC BY-SA 2.5
0
2011-03-07T17:38:58.130
2011-03-07T18:33:45.570
2011-03-07T17:49:23.320
440,611
440,611
[ "html", "css" ]
5,223,132
1
5,245,817
null
0
774
I have created a Silverlight class library which holds a lot of the common utility methods I use day to day in my Silverlight development. I am starting to play around with Workflow and would like to reuse this common dll. After referencing this dll in my workflow project I see a yellow warning icon beside it. ![enter image description here](https://i.stack.imgur.com/JDvNw.png) I can use the functionality from this dll when creating ‘Code Activities’ without issue. After adding the using statement for it all works AOK. ``` using EquinoxeAISManagementSystem.Common.Helpers; ``` when I try to import the dll from the activity designer, I do not see the dll in the import window. If I edit the XAML and add it directly, I get a warning. ![enter image description here](https://i.stack.imgur.com/pOjS1.png) Is it possible to reuse Silverlight dlls?
Importing / referencing an external Silverlight dll library from a workflow 4.0 Activity
CC BY-SA 2.5
null
2011-03-07T17:42:03.890
2011-03-09T12:32:12.357
2011-03-09T11:59:25.760
180,142
180,142
[ "visual-studio-2010", "workflow", "workflow-foundation-4" ]
5,223,156
1
5,232,467
null
13
8,735
I have a VSTO addin that I published on a network share. In my company everybody is able to install and update this application from the network share. Outside of the domain I am unable to install this customization. I get following error: ![Installation error screenshot](https://i.stack.imgur.com/gTNXO.png) Details: ``` ************** Exception Text ************** System.Security.SecurityException: Customized functionality in this application will not work because the certificate used to sign the deployment manifest for flow or its location is not trusted. Contact your administrator for further assistance. at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName) at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName) at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState) at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn() The Zone of the assembly that failed was: MyComputer ``` I first thought it was a problem with the certificate. So I explicitly installed the certificate on the client machine. That didn't solve it. When I copy the `flow` directory to let's say my desktop I can install and run the addin without any problem. So it seems the network folder is not a trusted location. I added the path `Z:/Software/Flow/` to the trusted locations in Excel options. This path automatically resolved to the full path //server/data/software/flow/. But that doesn't change anything. Anybody seen this before?
VSTO Excel 2007 addin fails to install from a network share
CC BY-SA 2.5
null
2011-03-07T17:44:14.340
2020-04-28T10:48:51.353
2011-03-08T10:28:47.667
419,436
419,436
[ ".net", "excel", "clickonce", "vsto" ]
5,223,512
1
5,223,875
null
4
2,126
i am using msdn sample code and it has jsonp wrapper files you can find the code here of this [article](http://jasonkelly.net/2009/05/using-jquery-jsonp-for-cross-domain-ajax-with-wcf-services/) and MSDN article JSON with Padding (AJAX) but when i run the code it throw me this error: `Encountered invalid root element name 'HTML'. 'root' is the only allowed root element name` what does it mean? ![enter image description here](https://i.stack.imgur.com/J9OpU.png)
Encountered invalid root element name 'HTML'. 'root' is the only allowed root element name
CC BY-SA 2.5
null
2011-03-07T18:20:23.607
2016-12-06T21:57:19.060
2011-03-08T01:02:03.270
473,921
275,390
[ "c#", "wcf" ]
5,223,830
1
5,490,873
null
16
20,641
I've been using the DataTables jQuery plugin with the filter plug in, and it is awesome. However, I was wondering if it is possible to filter table columns by row using a comparison operator (e.g. `'<' '>' or '<>'`) before a value in the filter input at the bottom of the table. [http://www.datatables.net/plug-ins/filtering#functions](http://www.datatables.net/plug-ins/filtering#functions) There is way to filter by range using input fields that accept a max and min value. However, I'd like to forgo adding two additional input fields and somehow parse the input of this column. The row i want to filter is populated with only integers (age) values. some examples of desire behaviour: ``` input results < 20 less than than 20 > 20 greater than 20 20 - 80 between 20 and 80 <> 20 not 20 ``` Anyone have experience modifying the behavior of the filter plugin to achieve this behavior? Thanks. ![example image](https://i.stack.imgur.com/bRmyH.png) I'd like to be able to directly type in the comparison operator into these input boxes. If an operator is detected it will filter based on the operator. If no filter operator is detected, I'd like it to filter normally. the html for the filter input looks like this: ``` <tfoot> <tr> ... <th class=" ui-state-default"> <input type="text" class="search_init" value="Age" name="search_age"> </th> <th class=" ui-state-default"> <input type="text" class="search_init" value="PD Status" name="search_age_of_onset"> </th> ... </tr> </tfoot> ``` Thanks!
jQuery DataTables filter column with comparison operators
CC BY-SA 2.5
0
2011-03-07T18:53:30.630
2011-04-01T16:03:33.343
2011-04-01T06:49:49.047
635,411
635,411
[ "javascript", "jquery", "jquery-plugins", "filtering", "datatables" ]
5,223,892
1
null
null
0
759
I have a dialog with spinners and an OK button. I also have an arraylist that is populated by the user selecting items in the spinners. I want the app to save the arraylist to a file and load it at every launch (because without saving the arraylist is always empty at launch). So here is the code i am using. The saving should be okay, at least i get the Toast message saying Saving OK. This code is the OKbtn listener so when user clicks ok, an item is added to the arraylist and there comes this code: ``` if (assignArr.size() > 0) { String filename = "file.txt"; ArrayList<String> report = new ArrayList<String>(); for (int i=0; i<assignArr.size(); i++) { report.add(assignArr.get(i)); } FileOutputStream fos; try { fos = openFileOutput(filename,Context.MODE_PRIVATE); ObjectOutputStream out = new ObjectOutputStream(fos); out.writeObject(report); out.close(); Toast.makeText(MainActivity.this, "Saving OK", Toast.LENGTH_LONG).show(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } ``` I put the loading part to the beginning of the code, but i don't think it matters: ``` words = new ArrayList<String>(50); try { InputStream is = getResources().getAssets().open("file.txt"); BufferedReader br = new BufferedReader(new InputStreamReader(is)); String line; while((line = br.readLine()) != null) { words.add(line); } is.close(); } catch (IOException e) { e.printStackTrace(); } if (words.size() > 0) { for (int i=0; i<words.size(); i++) { assignArr.add(words.get(i)); Toast.makeText(MainActivity.this, "Loading OK", Toast.LENGTH_LONG).show(); } } ``` In this case i never get the toast message. One problem can be that where is the file created? Where in the emulator and where on the phone? And regarding the phone, is it created on the sd card or the phone memory? I hope this is the right code to save and load an arraylist. What is wrong with the code? Update: I replaced `InputStream is = getResources().getAssets().open("file.txt");` with`InputStream is = openFileInput("file.txt");` Now something happens. I write out the result of the saving and the loading into a toast message, which is weird: ``` Toast.makeText(MainActivity.this, "Saving OK + " + report, Toast.LENGTH_LONG).show(); ``` Please take a look at it. The words on the bottom are partly hungarian names. So maybe the saving an arraylist to a file is the problem. ![enter image description here](https://i.stack.imgur.com/3CVu8.png)
Android filewriting, reading
CC BY-SA 2.5
null
2011-03-07T18:58:13.620
2011-03-07T22:08:34.043
2011-03-07T22:08:34.043
571,648
571,648
[ "android", "file" ]
5,224,042
1
5,224,095
null
30
60,344
I am attempting to install PostgreSQL 9 (postgresql-9.0.3-1-windows.exe) on my WinXP machine and get the following error at the start: ![Unable to write inside TEMP environment variable path.](https://i.stack.imgur.com/0bUdn.png) Some googling around yielded some advice that suggested [Windows Scripting Host might be disabled](http://1stopit.blogspot.com/2011/01/postgresql-83-and-84-fails-to-install.html). I've checked and WSH is definitely enabled, so it must be something else. Question is, what? I can see a file called is created in %TEMP% and when I try to run this manually, I get the following: ![enter image description here](https://i.stack.imgur.com/gCEoA.png) Which looks like a permissions error. However, I am an Admin, and I've given myself full control of the temp folder and it's still not working. Any help appreciated.
PostgreSQL 9 install on Windows: "Unable to write inside TEMP environment path."
CC BY-SA 3.0
0
2011-03-07T19:11:18.140
2021-06-23T04:28:58.560
2014-02-14T11:18:05.203
1,283,166
1,944
[ "windows", "postgresql", "installation" ]
5,224,157
1
5,224,294
null
1
1,355
I'm working with 2D Fourier transforms, and I have a method that will output the following result: ![Original Image](https://i.stack.imgur.com/uAcHP.png) The code looks like this: ``` private Bitmap PaintSin(int s, int n) { Data = new int[Width, Height]; Bitmap buffer = new Bitmap(Width, Height); double inner = (2 * Math.PI * s) / n; BitmapData originalData = buffer.LockBits( new Rectangle(0, 0, buffer.Width, buffer.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb); for (int i = 0; i < buffer.Width; i++) { for (int j = 0; j < buffer.Height; j++) { double val; int c = 0; if (j == 0) { val = Math.Sin(inner * i); val += 1; val *= 128; val = val > 255 ? 255 : val; c = (int)val; Color col = Color.FromArgb(c, c, c); SetPixel(originalData, i, j, col); } else SetPixel(originalData, i, j, GetColor(originalData, i, 0)); Data[i, j] = c; } } buffer.UnlockBits(originalData); return buffer; } ``` Now, I'm trying to think of a formula that will accept an angle and will out put an image where the solid lines are at the given angle. For example, if I inputted 45 Degrees, the result would be: ![Rotated image](https://i.stack.imgur.com/MiAAK.png) Thank you for any help! Here is the SetPixel code if that is needed: ``` private unsafe void SetPixel(BitmapData originalData, int x, int y, Color color) { //set the number of bytes per pixel int pixelSize = 3; //get the data from the original image byte* oRow = (byte*)originalData.Scan0 + (y * originalData.Stride); //set the new image's pixel to the grayscale version oRow[x * pixelSize] = color.B; //B oRow[x * pixelSize + 1] = color.G; //G oRow[x * pixelSize + 2] = color.R; //R } ```
Draw rotated sine image
CC BY-SA 2.5
null
2011-03-07T19:21:19.380
2011-03-07T19:38:17.597
null
null
490,326
[ "c#", "image", "math", "graphics" ]
5,224,474
1
5,224,558
null
12
36,740
I have a server running on the network my computer is on. Is there a way to allow the virtual device to use this same network and access the server? The virtual device won't let me toggle the wifi (probably because it doesn't have one). The only options I see that look right are: "Wireless & network settings" --> "Mobile networks" --> "Access point names". I'm not sure what to fill into all these fields though. If someone has an example of all the fields that are necessary to use the local computers internet, I'd appreciate it. The virtual device is emulating my Droid X (API 2.2). I'm not looking for answers on how to communicate with the server but to get on the net and possibly a simple test to verify I'm on (right now I'm just using the ConnectivityManager to check) ![Edit access point GUI](https://i.stack.imgur.com/Uc9LA.png)
(How) Can an android virtual device use the local computer's internet?
CC BY-SA 2.5
0
2011-03-07T19:47:10.517
2018-01-03T01:36:09.450
null
null
618,551
[ "android", "android-emulator", "android-2.2-froyo" ]
5,224,569
1
null
null
0
604
I am trying to create a Mobile version of my website. It is an online application, but I would like to make a mobile version through the web format. So if they visit, www.example.com it takes them to the mobile version. (Which it does currently). But the problem that I am having is creating a nice user friendly interface between the multiple devices, ie: BlackBerry, Android, iPhone. And I am sure this is near impossible to get the same. But I would like some similarities. Is there any form of template that I can start from? I have noticed that it is better to use "EM" font-sizes verses any other to create a more stable consistency. I really enjoy this layout of TweetDeck ![enter image description here](https://i.stack.imgur.com/1XNJh.jpg) I like the layout of the buttons along the bottom. Is there anything I can do to create this consistency? Do I create this in my browser at 100%, or do I need to detect the width of the browser FIRST and then create the UI?
Android Web App GUI layout and control
CC BY-SA 2.5
0
2011-03-07T19:58:42.640
2011-03-07T20:08:31.303
null
null
679,601
[ "iphone", "web-applications", "blackberry", "android-layout", "android" ]
5,224,645
1
null
null
0
44
[http://site2.ewart.library.ubc.ca/](http://site2.ewart.library.ubc.ca/) When I use my IE 7 or IE 8 to visit this page, the text below the carousel image is aligned to the right, until I manually navigate images through clicking the left & right button or the dots. At the same time, the left & right buttons are placed under the dots, while it should be on the right of the dots. (this page works properly in FF). I also got some feedback from folks saying that this page works correctly in their IE 8. So I am totally confused. Thanks. (Please see attached screenshot from my IE 8) ![enter image description here](https://i.stack.imgur.com/dWQ7q.gif)
Please help me with this page with IE 7/8
CC BY-SA 2.5
null
2011-03-07T20:05:17.377
2012-05-31T14:46:20.013
2012-05-31T14:46:20.013
44,390
451,326
[ "css", "alignment", "css-float" ]
5,225,278
1
5,225,460
null
1
362
Say I have a Core Data NSManagedObject that has an attribute which stores a image. If I want to delete the image but not the NSMAnagedObject how do I do it? Right now I'm using. This seems to be working but I am getting intermittent crashes related to this code so I'd like to be sure. ``` -(void)deletePhoto{ note.thumbnail = nil; //This is a thumbnail image [context deleteObject:note.image]; //This is an image related to the object via a to-one relationship NSError *error; if (![context save:&error]) NSLog(@"Error saving: %@", [error localizedDescription]); ``` } ![enter image description here](https://i.stack.imgur.com/dK2D4.png)
How do you nullify an attribute in Core Data?
CC BY-SA 2.5
null
2011-03-07T21:09:35.197
2011-03-07T21:26:56.853
null
null
519,493
[ "ios", "core-data" ]
5,225,268
1
5,225,521
null
6
4,284
The task: Make the text content of the InlineUIContainer to be inline with the outer text The standard behaviour of the InlineUIContainer content is when the bottom edge is inline with the outer text. It is possible to shift the content of InlineUIContainer with RenderTransform, but the value of Y has to be chosen for each font type and size - not a perfect way. ``` <RichTextBox> <FlowDocument> <Paragraph> LLL <InlineUIContainer> <Border Background="LightGoldenrodYellow"> <TextBlock Text="LLL"/> </Border> </InlineUIContainer> LLL </Paragraph> <Paragraph> LLL <InlineUIContainer> <Border Background="LightGoldenrodYellow"> <Border.RenderTransform> <TranslateTransform Y="5" /> </Border.RenderTransform> <TextBlock Text="LLL"/> </Border> </InlineUIContainer> LLL </Paragraph> </FlowDocument> </RichTextBox> ``` ![Example](https://i.stack.imgur.com/Czu0P.png) How to align the text in the InlineUIContainer content with the outer text in RichTextBox regardless of font type and size?
WPF. How to align text in InlineUIContainer content with outer text in RichTextBox
CC BY-SA 2.5
null
2011-03-07T21:08:19.293
2011-03-09T07:07:31.610
2011-03-09T07:07:31.610
623,190
623,190
[ "wpf", "richtextbox", "inlineuicontainer" ]