Search Results

Search found 6502 results on 261 pages for 'dont reinvent the wheel'.

Page 194/261 | < Previous Page | 190 191 192 193 194 195 196 197 198 199 200 201  | Next Page >

  • App closes after facebook login in IOS 5

    - by Aromal Sasidharan
    I am using facebook sdk 3.1 framework for my application. The login process works successfully and returns to the app after facebook login both in simulator(iOS 6.0 and 5.0) and in iPad(iOS 6). But When the same is deployed in IPad with IOS 5, after login, it does not return back to my application and shows a blank white Screen or sometimes my application closes. I dont know what went wrong in iOS 5 and facebook sdk 3.1 framework, also i am not getting any logs to debug... Please help Iam using this code for login NSArray *permissions = [[NSArray alloc] initWithObjects: //@"user_likes", //@"read_stream", @"publish_stream", @"user_events", @"read_friendlists", @"user_birthday", @"email", nil]; [FBSession openActiveSessionWithPermissions:permissions allowLoginUI:YES completionHandler: ^(FBSession *session, FBSessionState state, NSError *error) { NSLog(@"state %d", state); [self sessionStateChanged:session state:state error:error]; }];

    Read the article

  • unique random id

    - by Piyush
    I am generating unique id for my small application but I am facing some variable scope problem. my code- function create_id() { global $myusername; $part1 = substr($myusername, 0, -4); $part2 = rand (99,99999); $part3 = date("s"); return $part1.$part2.$part3; } $id; $count=0; while($count == 1) { $id; $id=create_id(); $sqlcheck = "Select * FROM ruser WHERE userId='$id';"; $count =mysql_query($sqlcheck,$link)or die(mysql_error()); } echo $id; I dont know which variable I have to declare as global

    Read the article

  • Can anyone tell me were I am making mistake in the snippet

    - by Solitaire
    public partial class Form1 : Form { [DllImport("coredll.dll")] static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); const int GWL_WNDPROC = -4; public delegate int WindProc(IntPtr hWnd, uint msg, long Wparam, long lparam); public Form1() { InitializeComponent(); WindProc SampleProc = new WindProc (SubclassWndProc); SetWindowLong(this .Handle , GWL_WNDPROC, SampleProc.Method .MethodHandle.Value.ToInt32()); } public int SubclassWndProc(IntPtr hwnd, uint msg, long Wparam, long lparam) { return 1; } Here is the sample which i was trying to take the window procedure of a form, this is how i do in C++ i get the windwproc easlily if i try the same in C# .net 3.5 i am unable to get the window proc,, after calling SetWindowLong API application hangs and it pops up some dont send report... i have read this is the way to get the window proc.. please let me know were i am making mistake...

    Read the article

  • How to release a string created inside a method in iphone?

    - by Warrior
    I have declared a local string inside the method.I am releasing the string inside the same method.I found my code crashing if release that object.If i dont release the string,code runs successfully.I have called that method in viewdidappear so that method is called while pushing and poping.Nothing gets printed in the console. Here is my code -(void)appendString{ NSString *locStr = [[NSString alloc] initWithString:@""]; for (int i=0;i<[result count]; i++) { locStr=[locStr stringByAppendingFormat:@"%@",[result objectAtIndex:i]]; } [str setString:locStr]; [locStr release]; } I am calling the "appendString" method from "viewDidAppear"."str" is a NSMutable string declared in .h class.How should i release the "locStr" .Please help me out

    Read the article

  • dependent drop down list

    - by sushant
    i want to make a two drop down lists. the first list has static data( folder structure), so i can use an array for it,and depending on the folder or option selected in the first list, the second list shows the sub-folders in it. but the sub-folders keeps on changing, so i have to use asp fso for it. i am using the following fso code: <%@ Language=VBScript ENABLESESSIONSTATE = False% <% Dim fso, folder, files Set fso=Server.CreateObject("Scripting.FileSystemObject") Set folder=fso.GetFolder("D:\") Set files=folder.SubFolders For each folderIdx In files Response.Write("<option>" + folderIdx.Name + "</option>") Next % i dont know how to make such a dependent list. any help is really appreciated. and i am sorry for the formatting issue

    Read the article

  • how to get audio frequency data from a wave file?

    - by potlee
    I want to build a speech recognition engine in ruby. I know i'll never get there, doing it just for fun. I need to get data for the frequencies of the sound stored in a wav file to compare with data i already have of different sounds that i want to recognize. I will write the code in ruby but i dont think there are any libraries for this written in ruby, they would be too slow if there were any anyway. The good thing about ruby is I'll be able to use libraries for .net via IronRuby or Java via Jruby. How can i get the frequency data?

    Read the article

  • Fatal error: Call to undefined function mysqli_connect()

    - by Jack
    I have installed WAMP. I am using Tomcat 6 to run my PHP scripts. I am also using JavaBridge.war and I have copied my php scripts into \webapp\JavaBridge\project. I have removed the semicolon from php.ini file before the statements extension=php_mysqli.dll extension=php_mysql.dll I have added C:\wamp\bin into my PATH env variable. I have copied all dll's from C:\wamp\bin\php\php5.3.0\ext into C:\windows\system32 I am still getting this error. Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\pf_query.php on line 534 Note - I dont get this error when I run my PHP script from Apache 2.2.11 of the WAMP package.

    Read the article

  • How to save a file that contains 2 QMap datas in Qt?

    - by Hanny
    I have 2 datas which type is QMap: 1.QMap novel; QString tempChapter; QString tempStory; 2.QMap combo; int tempInd; QString tempChap; my question is: How can I save these 2 Datas into a single file?? And if it's successfully saved, how can I load these 2 datas? Please insert the code too because I'm a beginner C++ programmer and dont know much about OOP,, please answer this ASAP! Thank you very much! :)

    Read the article

  • How to include a Custom list in one Sharepoint site in to another as a web part?

    - by Rakhitha
    I have two share point web sites. One is a child web site of the other. For example if my first site is myweb1, other one is myweb1/myweb2. I have a custom list created in myweb1. I want to include that as a web part in number of web pages in both myweb1 and myweb1/myweb2 sites. Including the web part in the same site which contains the custom list is not a problem. But how do I include it in the other site. The web part does not show up in the list. I dont want to copy the content of custom list. I want pages in both sites that have included this list as a web part to be updated whenever the list content is changed. Any ideas?

    Read the article

  • How do i setup Login module in my web application? in Java?

    - by Nitesh Panchal
    Hello, I am making web application in java. My username and passwords as well as roles are stored in database. I could use jdbcRealm, but it forces me to use a specific structure which i dont have in my project. So, how do i do it? I am using Glassfish v3.0 with Netbeans 6.8. I read few tutorials about custom LoginModule but i am not getting anything out of it. How do you all people do it practically in your projects? If you can show me code of custom LoginModule then also it will do. Waiting for replies.

    Read the article

  • Twitter Streaming API - tracking exact multiple keywords in exact order

    - by Gublooo
    Hey Guys, I'm just beginning to play with the Twitter Streaming API. If I specify $sc-setTrack(array('just bought from')); This will correctly pull only tweets that have all 3 keywords - but doesn't maintain the order. 1) I want the keywords to appear in the same order like "I just bought apple from itunes" but the above also returns tweets like "I bought some apples and just removed them from the bag" 2) Is there a way to specify the exact words say "NBA basketball" with nothing in between - in the sense I dont want tweets like this to be returned Watching basketball on NBA tv I just want tweets which contain the exact phrase to be returned like I love watching NBA basketball 3) Also is there a way to specify negative keywords Any tips if this is possible. Thanks

    Read the article

  • Login form to an a secured app in tomcat

    - by patricio
    I have a normal HTML page in a normal Apache http server (http://yyy.yyy.yyy.yyy/index.html ), with an authentication form, with that form I need to access with the credentials to an application located in other server with diferent IP , that server have a secured application with tomcat: here is the login form in the apache http server: <form method="POST" id="theForm" action="http://xxx.xxx.xxx.xxx:8080/securedapp/j_security_check"> <input name="j_username" type="text" class="tx_form" id="j_username" size="20" /> <input name="j_password" type="password" class="tx_form" id="textfield2" size="20" /> <input name="btn" type="submit" value="login" /> </form> the submit only works random in chrome and dont work in IE and FF. im doing something wrong?

    Read the article

  • where to store information like gender and year of birth?

    - by fayer
    i have users and i need them to specify a gender (male, female) and year of birth (1930, 1931...1999, 2000). i wonder where i should store these values: in the database? in php file? if i store them in the database i have to manually create all entries first. but a good thing is that the user table will have constraints so the gender field will always be male or female, it cannot be something else. if i store them in the php file (eg. as html) then i can easily add/remove values. but a con is that i dont have the constraints in database, so another value could be stored as gender by mistake, even though i could add validation in php backend so even if someone hacked the html it is not stored unless it's either male or female. what is best practice to do this? thanks

    Read the article

  • jQuery: add border on hovered element but NOT parents

    - by John Isaacks
    I have this code: var originalBorder = container.css("border"); container.hover(function(event) { event.stopPropagation(); $(this).css("border", "1px solid "+options.color); },function(){ $(this).css("border", originalBorder); }); Which I am using to add a border to the currently hovered element. However for example if a span is inside a div they are both getting borders. I only want to target the span. I thought that adding event.stopPropagation() would do the trick (this is what I would do in Flex, which is what I am more used to) but I guess this is a live event which I dont even understand what that means. So basically how can target the youngest element without triggering the parents? Thanks!!

    Read the article

  • Jquery Accordion and multiple slideshows

    - by Dipesh Parmar
    I've been using a lot of slideshows recently on my sites and one thing thats puzzled me is using more than one slideshow per page. I'm currently working on my own site, experimenting with Jquery Accordion. I've managed to adopt a very simple javascript slideshow, see below: http://dvpwebdesign.com/test/accordion/blank.html However i'm unable to either incorporate or use a different multiple slideshow plugin. I dont need slideshow navigation, so the The Cycle plugin works really well and i know you can use multiple slideshows. But if i either use Cycle alongside the current javascript slideshow, or only use the Cycle slideshow to avoid any possible conflict, the Accordion menu stops working. I just cant see what i am doing wrong, can anyone help?

    Read the article

  • benefit os having a factory for object creation?

    - by ajsie
    im trying to understand the factory design pattern. i dont understand why it's good to have a middleman between the client and the product (object that the client wants). example with no factory: $mac = new Mac(); example with a factory: $appleStore = new AppleStore(); $mac = $appleStore->getProduct('mac'); how does the factory pattern decouple the client from the product? could someone give an example of a future code change that will impact on example 1 negative, but positive in example 2 so i understand the importance of decoupling? thanks

    Read the article

  • Java: How to make this Serializable?

    - by Hasslarn
    I dont know that much about Serializable, but i need this class to be. How to achieve it? package helpers; public class XY implements Comparable<XY> { public int x; public int y; public XY (int x, int y) { this.x = x; this.y = y; } public int compareTo( XY other ) { String compare1 = this.x + "-" + this.y; String compare2 = other.x + "-" + other.y; return compare1.compareTo( compare2 ); } public String toString() { return this.x + "-" + this.y; } } As of now i cant send it as an object with outputstream..I´ve tried just to implement Serializable but it doesnt do the trick!

    Read the article

  • Intellij UML diagram does not show one to many relationships

    - by Calm Storm
    I am trying to follow http://www.jetbrains.com/idea/features/uml_class_diagram.html I have a few classes so when I do Ctrl + Alt + U I only see all classes and just Extends relationships. Please note that I have set the "Diagrams" options in my settings to show one to many etc. I do not see One to One, One to Many relationships at all ? I have used JPA OneToOne Annotations and they dont turn up at all? Pressing Ctrl Shift F12 does not do anything? Can someone please explain?

    Read the article

  • c# error when using the Database.cs files

    - by Kumu
    Inconsistent accessibility: parameter type 'FoolballLeague.FootballLeagueDatabase' is less accessible than method 'FoolballLeague.MainMenu.MainMenu(FoolballLeague.FootballLeagueDatabase)' C:\Users\achini\Desktop\FootballLeague\FootballLeague\MainMenu.cs I have got this error when I insert this part to the code //public MainMenu(FootballLeagueDatabase footballLeagueDatabaseIn) //{ //InitializeComponent(); //footballLeagueDatabase = footballLeagueDatabaseIn; //} The whole code of the first part is as following, But I dont know what do I need to do to sort out this error. public partial class MainMenu : Form { FootballLeagueDatabase footballLeagueDatabase; Game game; Login login; public MainMenu() { InitializeComponent(); changePanel(1); } //public MainMenu(FootballLeagueDatabase footballLeagueDatabaseIn) //{ //InitializeComponent(); //footballLeagueDatabase = footballLeagueDatabaseIn; //} If you have any idea please let me know, I need this part to the system.

    Read the article

  • Is there a way to inspect all controller variables at once in Rails?

    - by m.u.sheikh
    I am exploring an big controller method, with about 10 or so instance variables. Some of them are set in before_filter methods, and some others inside the method itself. I want to inspect them with puts, but dont want to write all of them out example: puts "var1: #{@var1.inspect}....var15: #{@var15.inspect}" Is there a generic method that will display all the instance variables with an @ sign set so far in the current method? If not, what is the next best way to inspect all of them at once without having to write all of them in a puts statement?

    Read the article

  • sql data source re binding question

    - by Keith
    In my gridview after an insert operation has been done I am filtering the sqldatasource by ID. I am getting an error that the item drop down box selected value is not in the list. To test my theory I created a new sql data source with only the select statement and after the insert operation I am binding it to my grid view and filtering by Id and I get my result. The question Having a second data source is not the solution so is it possible that there is some way to use sqldatasource1? what I tried is sqldatasource.databind() and gridview.databind() on the inserted and inserting metheds in many test cases but still that doesnt work. I dont have any filters applied on the original data source?

    Read the article

  • wrap text around image control in C#.Net

    - by Ravi
    Hi, I am working on C#.DotNet windows application project, here i am using Infragistics control. In this project i want to add image over text control. This image contains two portion, 35% of image have white color another 65% of image have green color.In this image 2nd portion(green color) i have to display dynamic string , this string size may dynamically updating. But this string dont go first portion(white color) of image. For that i am using UltraLabel control. I have add image in UltraLabel ImageBackground property and TextHAlign set as Right. But here small 15 charecter string means appear only second portion(green color), 20 charecter string means appeaer second & first portion. I don't want to display first portion of image. Thanks

    Read the article

  • Programatically creating site using custom template

    - by dexter
    hi, Help plz! How can I make a webpart that has a button called "Create Site" and it programatically create a site (using my own custom template e.g. Mytemplate.STP) ? The reason is of such task is, I dont want user to go into "Sites Action" - create Site - and then fill the whole form. I want to give a user an easy interface with only title field, the rest i want to be done programatically. Any other suggestions or work arounds are also appreciated. Thank you

    Read the article

  • What is the best strategy for a streaming screen capture application ?

    - by The_AlienCoder
    Ok Ive figured out how to do a screen capture of my desktop using Windows Media Encoder 9 + SDK and saving it as a movie on my hardrive. But now I want to take my project further and stream a realtime screen capture of my desktop . The idea is that users accessing my asp.net website will be able to view whatever Im doing on my desktop in real time via the video streaming from my computer. I really dont need the source code just the best strategy, procedure and server requirements.How will users access the streaming video on my website? Will it work on my godaddy shared hosting account or at what point will I need an upgrade? Will I be saving the stream to a file on the server for users to access or is there a way to stream directly ? I just need someone to point me in the right direction...

    Read the article

  • java: assigning object reference IDs for custom serialization

    - by Jason S
    For various reasons I have a custom serialization where I am dumping some fairly simple objects to a data file. There are maybe 5-10 classes, and the object graphs that result are acyclic and pretty simple (each serialized object has 1 or 2 references to another that are serialized). For example: class Foo { final private long id; public Foo(long id, /* other stuff */) { ... } } class Bar { final private long id; final private Foo foo; public Bar(long id, Foo foo, /* other stuff */) { ... } } class Baz { final private long id; final private List<Bar> barList; public Baz(long id, List<Bar> barList, /* other stuff */) { ... } } The id field is just for the serialization, so that when I am serializing to a file, I can write objects by keeping a record of which IDs have been serialized so far, then for each object checking whether its child objects have been serialized and writing the ones that haven't, finally writing the object itself by writing its data fields and the IDs corresponding to its child objects. What's puzzling me is how to assign id's. I thought about it, and it seems like there are three cases for assigning an ID: dynamically-created objects -- id is assigned from a counter that increments reading objects from disk -- id is assigned from the number stored in the disk file singleton objects -- object is created prior to any dynamically-created object, to represent a singleton object that is always present. How can I handle these properly? I feel like I'm reinventing the wheel and there must be a well-established technique for handling all the cases.

    Read the article

< Previous Page | 190 191 192 193 194 195 196 197 198 199 200 201  | Next Page >