Search Results

Search found 4191 results on 168 pages for 'roaming profile'.

Page 27/168 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • How to add dynamic profile fields in Invision Power Board?

    - by user361908
    I run a game server and want to link the persons in game character name and stats to Invision Power Board. I've setup IPB so players currently login with their in game login. That means their username on the forum is the same as their username for the game. They can have multiple characters on 1 account so ideally I'd like to allow them to choose a main character and display an actual image of that character and allow them to display other characters if they are online. Currently I'm doing something like this by hacking profileFields.php but it's messy and not very efficient on the user or server end. My code currently uses 2 custom fields which the player can enter their character names in. To display only their main character they enter the name in the first field. To also display other characters if they are online they enter the same name into the second field. To resolve the IDs I have to run a lot of queries. I know PHP but I am not familiar with IPBs code at all. I just need pointed in a direction where I can combine the 2 fields into 1 field. tl;dr: Here is my setup: Invision Power Board 3 Data is stored in MySQL on the same server the forum is hosted on. Usernames on the forum are identical to usernames in the game Here is a breakdown of what I'd like to do: In the edit profile section I need to resolve the forum username to the games account id then: Display a list of characters and allow them to choose which characters they want to display if they are online as well as a default character that will be displayed if none are online. In the posts user info pane: Display the online character or the default if none are online. Here is what I need to know: How to generate a list of characters in the profile edit form and allow selection (checkbox) of each character to display as well as the selection of a default character (radio or dropdown?) How to fetch the data and place it in the posts user info pane

    Read the article

  • How to update the user profile through tokenid when a particular user logs in using his username and password

    - by Rani
    i have an application in which when the user enters his username and password in the login form , his username and password are submitted to the server database for validation and if he is a valid user a tokenid is generated for him through JSON response and he is allowed to log in.this is the JSON response that i get in the console when a valid user log in through the log in form : {"TokenID":"kaenn43otO","isError":false,"ErrorMessage":"","Result":[{"UserId":"164","FirstName":"Indu","LastName":"nair","Email":"[email protected]","ProfileImage":null,"ThumbnailImage":null,"DeviceInfoId":"22"}],"ErrorCode":900} 2011-06-24 11:56:57.639 Journey[5526:207] this is token id:kaenn43otO so when the same user wants to update his profile by clicking on the update tab using the tokenid So that if he want he can his firstname,lastname,password,email.etc.i i have done the following code to update the user profile using tokenid but it does not work.i get tokenid when the user log in and this tokenid i have to pass to other class: this is my code to update user profile: -(void)sendRequest { //this is the class in which i get the tokenid and i am passing it to this class apicontroller *apitest = [[apicontroller alloc]init]; NSString *tokentest = apitest.tokenapi; NSString *post = [NSString stringWithFormat:@"Token=%@&firstname=%@&lastname=%@&Username=%@&Password=%@&Email=%@",tokentest,txtfirstName.text,txtlast.text,txtUserName.text,txtPassword.text,txtEmail.text]; NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; NSLog(@"%@",postLength); NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:@"http://192.168.0.1:96/JourneyMapperAPI?RequestType=Register&Command=SET"]]; [request setHTTPMethod:@"POST"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; if (theConnection) { webData = [[NSMutableData data] retain]; NSLog(@"%@",webData); [theConnection start]; } else { } } -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [webData setLength: 0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [webData appendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { [connection release]; [webData release]; } -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *loginStatus = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding]; NSLog(@"%@",loginStatus); [loginStatus release]; [connection release]; [webData release]; } -(IBAction)click:(id)sender { [self sendRequest]; } this is my apicontroller.m file in which i am creating login form so that user login and in this page tokenid is generated -(void)sendRequest { UIDevice *device = [UIDevice currentDevice]; NSString *udid = [device uniqueIdentifier]; //NSString *sysname = [device systemName]; NSString *sysver = [device systemVersion]; NSString *model = [device model]; NSLog(@"idis:%@",[device uniqueIdentifier]); NSLog(@"system nameis :%@",[device systemName]); NSLog(@"System version is:%@",[device systemVersion]); NSLog(@"System model is:%@",[device model]); NSLog(@"device orientation is:%d",[device orientation]); NSString *post = [NSString stringWithFormat:@"Loginkey=%@&Password=%@&DeviceCode=%@&Firmware=%@&IMEI=%@",txtUserName.text,txtPassword.text,model,sysver,udid]; NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; NSLog(@"%@",postLength); NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:@"http://192.168.0.1:96/JourneyMapperAPI?RequestType=Login"]]; [request setHTTPMethod:@"POST"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; if (theConnection) { webData = [[NSMutableData data] retain]; NSLog(@"%@",webData); } else { } } //to select username and password from database. -(void)check { //app.journeyList = [[NSMutableArray alloc]init]; [self createEditableCopyOfDatabaseIfNeeded]; NSString *filePath = [self getWritableDBPath]; sqlite3 *database; if(sqlite3_open([filePath UTF8String], &database) == SQLITE_OK) { const char *sqlStatement = "SELECT Username,Password FROM UserInformation where Username=? and Password=?"; sqlite3_stmt *compiledStatement; if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) { sqlite3_bind_text(compiledStatement, 1, [txtUserName.text UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(compiledStatement, 2, [txtPassword.text UTF8String], -1, SQLITE_TRANSIENT); //NSString *loginname= [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)]; // NSString *loginPassword = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)]; } if(sqlite3_step(compiledStatement) != SQLITE_ROW ) { NSLog( @"Save Error: %s", sqlite3_errmsg(database) ); UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"UIAlertView" message:@"User is not valid" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; alert = nil; } else { isUserValid = YES; if (isUserValid) { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"UIAlertView" message:@"Valid User" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; } } sqlite3_finalize(compiledStatement); } sqlite3_close(database); } -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [webData setLength: 0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [webData appendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { [connection release]; [webData release]; } -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *loginStatus = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding]; NSLog(@"%@",loginStatus); //this is to perfrom insert opertion on the userinformation table NSString *json_string = [[NSString alloc] initWithData:webData encoding:NSUTF8StringEncoding]; NSDictionary *result = [json_string JSONValue]; //here i am storing the tokenid tokenapi = [result objectForKey:@"TokenID"]; NSLog(@"this is token id:%@",tokenapi); // BOOL errortest = [[result objectForKey:@"isError"] boolValue]; if(errortest == FALSE) { values = [result objectForKey:@"Result"]; NSLog(@"Valid User"); } else { NSLog(@"Invalid User"); } NSMutableArray *results = [[NSMutableArray alloc] init]; for (int index = 0; index<[values count]; index++) { NSMutableDictionary * value = [values objectAtIndex:index]; Result * result = [[Result alloc] init]; //through this i get the userid result.UserID = [value objectForKey:@"UserId"]; result.FirstName = [value objectForKey:@"FirstName"]; result.Username =[value objectForKey:@"Username"]; result.Email =[value objectForKey:@"Email"]; result.ProfileImage =[value objectForKey:@"ProfileImage"]; result.ThumbnailImage =[value objectForKey:@"ThumbnailImage"]; result.DeviceInfoId =[value objectForKey:@"DeviceInfoId"]; NSLog(@"%@",result.UserID); [results addObject:result]; [result release]; } for (int index = 0; index<[results count]; index++) { Result * result = [results objectAtIndex:index]; //save the object variables to database here [self createEditableCopyOfDatabaseIfNeeded]; NSString *filePath = [self getWritableDBPath]; sqlite3 *database; if(sqlite3_open([filePath UTF8String], &database) == SQLITE_OK) { const char *sqlStatement = "insert into UserInformation(UserID,DeviceId,Username,Password,FirstName,Email) VALUES (?,?,?,?,?,?)"; sqlite3_stmt *compiledStatement; if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) { //sqlite3_bind_text( compiledStatement, 1, [journeyid UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text( compiledStatement, 1, [result.UserID UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text(compiledStatement, 2, [result.DeviceInfoId UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text(compiledStatement, 3, [txtUserName.text UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text(compiledStatement, 4, [txtPassword.text UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text (compiledStatement, 5, [result.FirstName UTF8String],-1,SQLITE_TRANSIENT); sqlite3_bind_text (compiledStatement, 6, [result.Email UTF8String],-1,SQLITE_TRANSIENT); } if(sqlite3_step(compiledStatement) != SQLITE_DONE ) { NSLog( @"Save Error: %s", sqlite3_errmsg(database) ); } else { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"UIAlertView" message:@"Record added" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; alert = nil; } sqlite3_finalize(compiledStatement); } sqlite3_close(database); } [loginStatus release]; [connection release]; [webData release]; } -(IBAction)click:(id)sender { [self sendRequest]; //this is to select username and password from database. [self check]; } for a particular user who logs in only his profile must be update by using tokenid and userid.Please help me in solving this problem.Thanks

    Read the article

  • iPhone + Provisioning Profile + app-info.plist + entitlements.plist = iPhoneApp ? How ? What exactly

    - by sagar
    To execute my application in iPhone first of all I have to add provisioning profile in to my iPhone. Good. But I don't understand the reason behind adding a entitlements.plist in iphone application in xCode under resources. What does that entitlements.plist file do actually ? Why that .plist file have only single Boolean in it ? (get-task-allow) Can't we add that Boolean variable to application-info.plist ? I mean, I can't find the reason behind storing a single Boolean variable in separate plist file. Instead application-info.plist already contains many many application settings. Can't we just add this Boolean variable to application-info.plist. Ok, any way. I know - it won't be possible. Because we have to follow - what apple says. But, here main intention behind all these was "what is the basic need of entitlements.plist ?" or "what is the functionality of entitlements.plist ?" "How provisioning profile, entitlements.plist, application-info.plist & iPhone application compile all together & make verification on iPhone & execute it on iPhone ? "

    Read the article

  • Presence icon only showing for first person

    - by James123
    I am trying to show my colleagues in my custom webpart. So I adding presence Icon to each of colleague. It is showing fine when colleague is 1 only. If We have colleague more than 1 Presence Icon showing for 1st colleague you can dropdow that Icon also but other colleagues it is show simple Presense Icon (grayout) (not drop down is comming). code is like this. private static Panel GetUserInfo(UserProfile profile,Panel html, int cnt) { LiteralControl imnrc = new LiteralControl(); imnrc.Text = "<span style=\"padding: 0 5px 0 5px;\"><img border=\"0\" valign=\"middle\" height=\"12\" width=\"12\" src=\"/_layouts/images/imnhdr.gif\" onload=\"IMNRC('" + profile[PropertyConstants.WorkEmail].Value.ToString() + "')\" ShowOfflinePawn=1 id=\"IMID[GUID]\" ></span>"; html.Controls.Add(imnrc); html.Controls.Add(GetNameControl(profile)); //html.Controls.Add(new LiteralControl("<br>")); return html; } private static Control GetNameControl(UserProfile profile) { //bool hasMySite = profile[PropertyConstants.PublicSiteRedirect].Value == null ? false : true; bool hasMySite =string.IsNullOrEmpty(profile.PublicUrl.ToString()) ? false : true; string name = profile[PropertyConstants.PreferredName].Value.ToString(); if (hasMySite) { HyperLink control = new HyperLink(); control.NavigateUrl = String.IsNullOrEmpty(profile.PublicUrl.ToString()) ? null : profile.PublicUrl.ToString(); control.Style.Add("text-decoration","none"); control.Text = name; return control; } else { LiteralControl control = new LiteralControl(); control.Text = name; return control; } } http://i700.photobucket.com/albums/ww5/vsrikanth/presence-1.jpg

    Read the article

  • Button Visibility Converter

    - by developer
    Hi All, I have a requirement wherein I need to display on a User form, a Create Button if that user has doesnt have a profile and a Edit Button if he does have a profile. I am using a converter to change the visibility of the button. Below is my code, <StackPanel Orientation="Horizontal"> <Button Content="Create Profile" Visibility="{Binding Profile,Converter={StaticResource ButtonVisibilityConverter}, ConverterParameter='Create'}" Command="local:LaunchEditor" CommandParameter="{Binding}"/> <Button Content="Edit Profile" Visibility="{Binding Profile,Converter={StaticResource ButtonVisibilityConverter}, ConverterParameter='Edit'}" Command="local:LaunchEditor" CommandParameter="{Binding}"/> </StackPanel> Below is my converter code public class ButtonVisibilityConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string btName = null; btName = (string)parameter; if ((value==null)&&(btName=="Create")) { return Visibility.Visible; } else if ((value != null) && (btName=="Edit")) { return Visibility.Visible; } else { return Visibility.Collapsed; } } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } Everything works fine initially, but the moment I click on the Create Profile window, and it is the constructor that loads the profile window, after that even if I close that window without doing anything, the Create button turns to edit. My guess is that, it is because the constructor would have create the profile object and so even though the object is empty it shows me edit button instead of create. Is there any other way I could display button visibility??

    Read the article

  • Facebook - generating fb tag in Jquery - not working

    - by Gublooo
    Hey guys Kind of stuck here - I have this functionality on my site where I display 10 user comments along with their photo and when a user clicks on "More" - using Jquery more results are fetched from DB and the results are displayed via string generated in the Jquery method. This is a shortened version of my Jquery function $(".more_swipes").live('click',function() { var profile_id = 'profile-user_id; ?'; $.getJSON("/profile/more-swipes", { user_id: profile_id},function(swipes) { $.each(swipes, function(i,data){ newcomment="<div"; newcomment +="<fb:profile-pic uid='"+data.fb_userid+"' linked='false'/"; newcomment +="Name="+data.user_name+"-Comment="+data.comment; $("#moreswipes").append(newcomment); }); }); return false; }); Here as you can see I'm using the tag <fb:profile-pic uid='"+data.fb_userid+"' linked='false'/ Now when more results get displayed, the profile pic of the user is not getting displayed - when I look at the source code - this is how the fb tag looks when its generated thru Jquery <fb:profile-pic uid="222222" linked="false" height="50" width="50" Whereas the FB tags not generated thru the Jquery code look like <fb:profile-pic uid="222222" linked="false" height="50" width="50" class="FB_profile_pic <fb_profile_pic_rendered FB_ElementReady" style="width:px;height:50px" <img src="http://profile.atk......2025.jpg" alt="User Name" title="User Name" style="width:px;height:50px" class="FB_profile_pic"/ </fb:profile-pic So when I add it as a String in JQuery function - facebook is not identifying it and executing it Any idea how to fix this Thanks a bunch

    Read the article

  • Dependencyproperty doesn't have value on load

    - by Jakob
    My problem is this, I have a UC called profile that contains another UC called FollowImageControl. In my Profile.xaml i declaretively bind a property of FollowImageControl called FollowerId to a CurrentUserId from Profile.xaml.cs. Problem is that I CurrentUserId is assigned in Profile.xaml.cs; the Profile.xaml code-behind. This means that I do not initially get the FollowerId. I have these methods in the FollowImageControl.xaml.cs: public static readonly DependencyProperty _followUserId = DependencyProperty.Register("FollowUserId", typeof(Guid), typeof(FollowImageControl), null); public Guid FollowUserId { get { return (Guid)GetValue(_followUserId); } set { SetValue(_followUserId, value); } } public FollowImageControl() { // Required to initialize variables InitializeComponent(); LoggedInUserId = WebContext.Current.User.UserId; var ctx = new NotesDomainContext(); if (ctx.IsFollowingUser(LoggedInUserId, FollowUserId).Value) SwitchToDelete.Begin(); } private void AddImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (LoggedInUserId != FollowUserId) { var ctx = new NotesDomainContext(); ctx.FollowUser(FollowUserId, LoggedInUserId); ctx.SubmitChanges(); } } THE WEIRD THING IS that when i insert breakpoints the FollowerUserId in FollowImageControl() is 0, but it has a value in AddImg_MouseLeftButtonDown, and there is no inbetween logic that sets the value of it. How is this??? Here's a little more code info: This is my binding from profile.xaml <internalCtrl:FollowImageControl FollowUserId="{Binding ElementName=ProfileCtrl, Path=CurrentUserId}" /> this is my constructor in profile.xaml.cs wherein the CurrentUserId is set public static readonly DependencyProperty _CurrentUserId = DependencyProperty.Register("CurrentUserId", typeof(Guid), typeof(Profile), null); public Guid CurrentUserId { get { return (Guid)GetValue(_CurrentUserId); } set { SetValue(_CurrentUserId, value); } } public Profile(Guid UserId) { CurrentUserId = UserId; InitializeComponent(); Loaded += new RoutedEventHandler(Profile_Loaded); } I'm seriously dumbfound that one minute the FollowerId has no value, and the next it holds the right, without me having changed the value in the code-behind.

    Read the article

  • Podcast Show Notes: Collaborate 10 Wrap-Up - Conclusion

    - by Bob Rhubart
    Both parts of my conversation with a small army of people at Collaborate 10 are now available. Listen to Part 1 Listen to Part 2   Here’s the complete list of participants: Floyd Teter - Project Manager at Jet Propulsion Lab, OAUG Board Blog | Twitter | LinkedIn | Oracle Mix | Oracle ACE Profile Mark Rittman - EMEA Technical Director and Co-Founder, Rittman Mead,  ODTUG Board Blog | Twitter | LinkedIn | Oracle Mix | Oracle ACE Profile Chet Justice - OBI Consultant at BI Wizards Blog | Twitter | LinkedIn | Oracle Mix | Oracle ACE Profile Elke Phelps - Oracle Applications DBA at Humana, OAUG SIG Chair Blog | LinkedIn | Oracle Mix | Book | Oracle ACE Profile Paul Jackson - Oracle Applications DBA at Humana Blog | LinkedIn | Oracle Mix | Book Srini Chavali - Enterprise Database & Tools Leader at Cummins, Inc Blog | LinkedIn | Oracle Mix Dave Ferguson – President, Oracle Applications Users Group LinkedIn | OAUG Profile John King - Owner, King Training Resources Website | LinkedIn | Oracle Mix Gavyn Whyte - Project Portfolio Manager at iFactory Consulting Blog | Twitter | LinkedIn | Oracle Mix John Nicholson - Channels & Alliances at Greenlight Technologies Website | LinkedIn   del.icio.us Tags: oracle,otn,collborate 10,c10,oracle ace program,archbeat,arch2arch,oaug,odtug,las vegas Technorati Tags: oracle,otn,collborate 10,c10,oracle ace program,archbeat,arch2arch,oaug,odtug,las vegas

    Read the article

  • How can I configure the embedded wireless card in a Toshiba Satellite Pro 4600 to work under Lubuntu 10.10?

    - by MoLE
    I'm struggling to get the embedded wireless card in this laptop to work. In 7.10 (gutsy) it worked fine. Now I'm trying to get 10.10 (maverick) working on it, and am using the Lubuntu flavour due to the low resources of this laptop. The hardware: Appears to be an embedded pcmcia card. pccardctl ident gives: Socket 0: product info: "TOSHIBA", "Wireless LAN Card", "Version 01.01", "" manfid: 0x0156, 0x0002 function: 6 (network) The default kernel recognises the card and loads the orinoco_cs driver. orinoco_cs 0.0: Hardware identity 0005:0002:0001:0002 orinoco_cs 0.0: Station identity 001f:0001:0006:000e orinoco_cs 0.0: Firmware determined as Lucent/Agere 6.14 Then for some reason, the driver isn't happy with this and gives: orinoco_cs 0.0: Hardware identity 0005:0002:0001:0002 orinoco_cs 0.0: Station identity 001f:0002:0009:0030 orinoco_cs 0.0: Firmware determined as Lucent/Agere 9.48 All seems ok until I try to associate with my access point using Network Manager. eth1: Lucent/Agere firmware doesn't support manual roaming repeated about 10 times then NM gives up. According to the linuxwireless.org wiki page on this driver, this is a known issue, and I quote: Known issues Roaming and WPA_supplicant Lucent/Agere firmware doesn't support manual roaming On the Agere cards, roaming is controlled by the firmware instead of userspace. You will get the above message if userspace attempts to associate with a specific AP rather than by SSID. If you are using wpa_supplicant use ap_scan=2 mode. NetworkManager uses wpa_supplicant, so the above also applies. At this point my google-fu has failed me, and I can't find how to configure network manager to use the mystical "ap_scan=2" mode via wpa_supplicant. I have tried the following suggested solutions (from launchpad or the forums) deleting the agere* files from /lib/firmware using wicd instead of network manager combining both blacklisting the orinoco_cs driver in an attempt to force use of the hostap_cs driver instead (in case it is a prism2 card). Obviously none of them have worked for me. Any hints on how to perform the suggested workaround above? Edit: I have also confirmed working on 8.10 (intrepid) live CD.

    Read the article

  • How to Update Twitter profile picture using twitter api and data:image/gif;base64 ??

    - by Nok Imchen
    iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg== The above data is a picture in data:image/png;base64, format. Is it possible to update twitter profile picture without give the path of the image ( like http://....com) but by give the image data in the above format ???

    Read the article

  • How do I set libavcodec to use 4:2:2 chroma when encoding MPEG-2 4:2:2 profile?

    - by Mike Pollitt
    I have a project using libavcodec (ffmpeg). I'm using it to encode MPEG-2 video at 4:2:2 Profile, Main Level. I have the pixel format PIX_FMT_YUV422P selected in the AVCodecContext, however the video output I'm getting has all the colours wrong, and looks to me like the encoder is incorrectly reading the buffers as though it thinks it is 4:2:0 chroma rather than 4:2:2. Here's my codec setup: // // AVFormatContext* _avFormatContext previously defined as mpeg2video // // // Set up the video stream for output // AVVideoStream* _avVideoStream = av_new_stream(_avFormatContext, 0); if (!_avVideoStream) { err = ccErrWFFFmpegUnableToAllocateStream; goto bail; } _avCodecContext = _avVideoStream->codec; _avCodecContext->codec_id = CODEC_ID_MPEG2VIDEO; _avCodecContext->codec_type = CODEC_TYPE_VIDEO; // // Set up required parameters // _avCodecContext->rc_max_rate = _avCodecContext->rc_min_rate = _avCodecContext->bit_rate = src->_avCodecContext->bit_rate; _avCodecContext->flags = CODEC_FLAG_INTERLACED_DCT; _avCodecContext->flags2 = CODEC_FLAG2_INTRA_VLC | CODEC_FLAG2_NON_LINEAR_QUANT; _avCodecContext->qmin = 1; _avCodecContext->qmax = 1; _avCodecContext->rc_buffer_size = _avCodecContext->rc_initial_buffer_occupancy = 2000000; _avCodecContext->rc_buffer_aggressivity = 0.25; _avCodecContext->profile = 0; _avCodecContext->level = 5; _avCodecContext->width = f->GetWidth(); // f is a private Frame class with width, height properties etc. _avCodecContext->height = f->GetHeight(); _avCodecContext->time_base.den = 25; _avCodecContext->time_base.num = 1; _avCodecContext->gop_size = 12; _avCodecContext->max_b_frames = 2; _avCodecContext->pix_fmt = PIX_FMT_YUV422P; if (_avFormatContext->oformat->flags & AVFMT_GLOBALHEADER) { _avCodecContext->flags |= CODEC_FLAG_GLOBAL_HEADER; } if (av_set_parameters(_avFormatContext, NULL) < 0) { err = ccErrWFFFmpegUnableToSetParameters; goto bail; } // // Set up video codec for encoding // AVCodec* _avCodec = avcodec_find_encoder(_avCodecContext->codec_id); if (!_avCodec) { err = ccErrWFFFmpegUnableToFindCodecForOutput; goto bail; } if (avcodec_open(_avCodecContext, _avCodec) < 0) { err = ccErrWFFFmpegUnableToOpenCodecForOutput; goto bail; } A screengrab of the resulting video frame can be seen at http://ftp.limeboy.com/images/screen_grab.png (the input was standard colour bars). I've checked by outputting debug frames to TGA format at various points in the process, and I can confirm that it is all fine and dandy up until the point that libavcodec encodes the frame. Any assistance most appreciated! Cheers, Mike.

    Read the article

  • Why second user login redirects me to /accounts/profile/ url?

    - by drupality
    I am using Django built in view for user login: url(r'^user/login/$', 'django.contrib.auth.views.login', {'template_name': 'users/templates/login.html'}, name='user-login'), After login when I goto user/login again I can login second time. I submit the form and getting: The current URL, accounts/profile/, didn't match any of these. I haven't declare this url in urls.py. What I am doing wrong? Why framework want to redirect to this url?

    Read the article

  • Why does OpenGL's glDrawArrays() fail with GL_INVALID_OPERATION under Core Profile 3.2, but not 3.3 or 4.2?

    - by metaleap
    I have OpenGL rendering code calling glDrawArrays that works flawlessly when the OpenGL context is (automatically / implicitly obtained) 4.2 but fails consistently (GL_INVALID_OPERATION) with an explicitly requested OpenGL core context 3.2. (Shaders are always set to #version 150 in both cases but that's beside the point here I suspect.) According to specs, there are only two instances when glDrawArrays() fails with GL_INVALID_OPERATION: "if a non-zero buffer object name is bound to an enabled array and the buffer object's data store is currently mapped" -- I'm not doing any buffer mapping at this point "if a geometry shader is active and mode? is incompatible with [...]" -- nope, no geometry shaders as of now. Furthermore: I have verified & double-checked that it's only the glDrawArrays() calls failing. Also double-checked that all arguments passed to glDrawArrays() are identical under both GL versions, buffer bindings too. This happens across 3 different nvidia GPUs and 2 different OSes (Win7 and OSX, both 64-bit -- of course, in OSX we have only the 3.2 context, no 4.2 anyway). It does not happen with an integrated "Intel HD" GPU but for that one, I only get an automatic implicit 3.3 context (trying to explicitly force a 3.2 core profile with this GPU via GLFW here fails the window creation but that's an entirely different issue...) For what it's worth, here's the relevant routine excerpted from the render loop, in Golang: func (me *TMesh) render () { curMesh = me curTechnique.OnRenderMesh() gl.BindBuffer(gl.ARRAY_BUFFER, me.glVertBuf) if me.glElemBuf > 0 { gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, me.glElemBuf) gl.VertexAttribPointer(curProg.AttrLocs["aPos"], 3, gl.FLOAT, gl.FALSE, 0, gl.Pointer(nil)) gl.DrawElements(me.glMode, me.glNumIndices, gl.UNSIGNED_INT, gl.Pointer(nil)) gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, 0) } else { gl.VertexAttribPointer(curProg.AttrLocs["aPos"], 3, gl.FLOAT, gl.FALSE, 0, gl.Pointer(nil)) /* BOOM! */ gl.DrawArrays(me.glMode, 0, me.glNumVerts) } gl.BindBuffer(gl.ARRAY_BUFFER, 0) } So of course this is part of a bigger render-loop, though the whole "*TMesh" construction for now is just two instances, one a simple cube and the other a simple pyramid. What matters is that the entire drawing loop works flawlessly with no errors reported when GL is queried for errors under both 3.3 and 4.2, yet on 3 nvidia GPUs with an explicit 3.2 core profile fails with an error code that according to spec is only invoked in two specific situations, none of which as far as I can tell apply here. What could be wrong here? Have you ever run into this? Any ideas what I have been missing?

    Read the article

  • how to run if(!User.IsAuthenticated) or access Profile.values in App_Code? c# .NET

    - by korben
    i'm trying to run a conditional statement in a class i'm placing in my App_Code folder the condition is whether the person is logged in or not. I normally have two ways to do this in my masterpage and ASPX's if (!User.IsAuthenticated) or if(Profile.username = "anonymous") however neither of these things seem available to me in the .cs i'm making. anyone know what i'm missing? maybe a using namespace up top?

    Read the article

  • Get gprof to profile based on wall-clock time?

    - by jetwolf
    My understanding is that by default gprof takes into account CPU time. Is there a way to get it to profile based on wall-clock time? My program does a lot of disk i/o, so the CPU time it uses only represents a fraction of the actual execution time. I need to know which portions of the disk i/o take up the most time.

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >