Daily Archives

Articles indexed Tuesday April 13 2010

Page 12/126 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • SEAM nagivation based on function with parameters

    - by John
    How do you setup a navigation rule based on a function with parameters in SEAM ? For example <page view-id="/firstPage.xhtml" back="enabled"> <navigation from-action="#{actionBean.fetchItem(int index)}"> <redirect view-id="/itemDetail.xhtml" /> </navigation> </page> Thanks

    Read the article

  • Is there a safe / standard way to manage unstructured memory in C++?

    - by andand
    I'm building a toy VM that requires a block of memory for storing and accessing data elements of different types and of different sizes. I've done this by writing a wrapper class around a uint8_t[] data block of the needed size. That class has some template methods to write / read typed data elements to / from arbitrary locations in the memory block, both of which check to make certain the bounds aren't violated. These methods use memmove in what I hope is a more or less safe manner. That said, while I am willing to press on in this direction, I've got to believe that other with more expertise have been here before and might be willing to share their wisdom. In particular: 1) Is there a class in one of the C++ standards (past, present, future) that has been defined to perform a function similar to what I have outlined above? 2) If not, is there a (preferably free as in beer) library out there that does? 3) Short of that, besides bounds checking and the inevitable issue of writing one type to a memory location and reading a different from that location, are there other issues I should be aware of? Thanks.-&&

    Read the article

  • Large PHP enable web form - around 75 field - how best to send email with all fields?

    - by Derek
    Have created simple Ajax enabled contact forms before that have around 12 fields - worked fine.... Now working on a PHP enabled web page for job applications that has around 100 fields. The ajax technique I was using was to send request via querystrings (&val1=test;&val2=test2 and etc ...) That is not going to scale very well with larger form with 100+ fields. Any suggestions to point me in the right direction would be appreciated. Maybe use jQuery Form plug-in instead? http://jquery.malsup.com/form/#getting-started Derek

    Read the article

  • What are your favorite "yak shaving" euphemisms?

    - by dacracot
    Noun yak shaving (uncountable) (idiomatic) Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem. I was doing a bit of yak shaving this morning, and it looks like it might have paid off. So I'm after phrases like "yak shaving" that mean something to the developer community that non-developers don't understand. Not anecdotes.

    Read the article

  • Very basic Javascript constructors problem

    - by misha-moroshko
    Hi, In the following JavaScript code main() is called. My question is why the second constructor is called rather than the first one ? What am I missing here ? Thanks !! function AllInputs() { alert("cons 1"); this.radioInputs = []; alert(this); } function AllInputs(radioElement) { alert("cons 2"); this.radioInputs = [radioElement]; alert(this); } AllInputs.prototype.toString = function() { return "[object AllInputs: radioInputs: " + this.radioInputs.length + "]"; } function main() { var result = new AllInputs(); }

    Read the article

  • iPhone/iPad : Check for invalid characters in a textbox made for Integers only

    - by JustinXXVII
    I noticed that the iPhone OS is pretty good about picking out Integer values when asked to. Specifically, if you use NSString *stringName = @"6("; int number = [stringName intValue]; the iPhone OS will pick out the 6 and turn the variable number into 6. However, in more complex mistypes, this also makes the int variable 6: NSString *stringName = @"6(5"; int number = [stringName intValue]; The iPhone OS misses the other digit, when what could have possibly been the user trying to enter the number 65, the OS only gets the number 6 out of it. I need a solution to check a string for invalid characters and return NO if there is anything other than an unsigned integer in a textbox. This is for iPad, and currently there is no numeric keyboard like the iPhone has, and I'm instead limited to the standard 123 keyboard. I was thinking that I need to use NSRange and somehow loop through the entire string in the textbox, and checking to see if the current character in the iteration is a number. I'm lost as far as that goes. I can think of testing it against zero, but zero is a valid integer. Can anyone help?

    Read the article

  • Network Security [closed]

    - by kapilg
    I have been a .net developer for the past three yrs. Just curious to know about the network security field. What kind of work does the developers working in these area do? I really have not much idea about network security but what my understanding is these people are involved in securing network, preventing attacks on network as obvious. Could any one please give me some details about this field and also what does it take to move to this field.

    Read the article

  • Apache unresponsive on Vista [closed]

    - by William Hudson
    I had been running Apache on Vista for around a year, but recently upgraded my workstation. I did a clean install of Vista Ultimate and installed the latest version of the Apache server for win32 (2.2.11, no SSL). The service runs fine and there were no errors reported during the install, nor are there any errors in the Apache logs. However, any attempt to access the web site on localhost (or 127.0.0.1) just hangs the browser. I have used netstat to check who is listening to port 80 and it shows httpd.exe. I have also tried adjusting the .conf file to use port 8080 but this had no effect either (except to change the netstat output). This is a development system with quite a few other pieces of software installed. However, when I tried installing IIS, it worked fine (I removed it soon after before reattempting the Apache install). Using the older 2.0 version of Apache has no effect. Windows firewall is not running. I have disabled my NOD32 anti-virus. Any ideas what is going on? Regards, William

    Read the article

  • What is the difference between File and FileInfo in C# ?

    - by Lilitu88
    I've been reading that the static methods of the File Class are better used to perform small and few tasks on a file like checking to see if it exists and that we should use an instance of the FileInfo Class if we are going to perform many operations on a specific file. I understand this and can simply use it that way blindly but I would like to know why is there a difference ? What is it about the way they work that make them suitable for different situations ? What is the point of having this 2 different classes that seem do the same in different ways ? It would be helpful if someone could answer at least one of this questions.

    Read the article

  • surfaceview + glsurfaceview + framelayout

    - by pohtzeyun
    Hi, I'm new at this (java and opengl) so please bear with me if the answer to the question is simple. :) I'm trying to get a camera preview screen with the ability to display 3d objects simultaneously. Having gone through the samples at the api demos, I thought combining the code for the the examples at the api demo would suffice. But somehow its not working. The forces me to shut down upon startup and the error is mentioned as null pointer exception. Could someone share with me where did I go wrong and how to proceed from there. How I did the combination for the code is as shown below: myoverview.xml <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <android.opengl.GLSurfaceView android:id="@+id/cubes" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <SurfaceView android:id="@+id/camera" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </FrameLayout> myoverview.java import android.app.Activity; import android.os.Bundle; import android.view.SurfaceView; import android.view.Window; public class MyOverView extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Hide the window title. requestWindowFeature(Window.FEATURE_NO_TITLE); // camera view as the background SurfaceView cameraView = (SurfaceView) findViewById(R.id.camera); cameraView = new CameraView(this); // visual of both cubes GLSurfaceView cubesView = (GLSurfaceView) findViewById(R.id.cubes); cubesView = new GLSurfaceView(this); cubesView.setRenderer(new CubeRenderer(false)); // set view setContentView(R.layout.myoverview); } } GLSurfaceView.java import android.content.Context; class GLSurfaceView extends android.opengl.GLSurfaceView { public GLSurfaceView(Context context) { super(context); } } NOTE : I didnt list the rest of the files as they are just copies of the api demos. The cameraView refers to the camerapreview.java example and the CubeRenderer refers to the CubeRenderer.java and Cube.java example. Any help would be appreciated as I've been stuck at this for a couple of days :p Thanks Sorry, didnt realise that the coding was out of place due to formatting mistakes. :p

    Read the article

  • I am trying to use user-defined functions to print out an inputted letter out of stars, but i need h

    - by lm
    def horizline(col): for col in range (col): print("*", end='') print() def vertline(rows, col): for rows in range (rows-2): print ("*", end='') for col in range (col-2): print(' ', end='') print("*") def functionA(width): horizline(width) vereline(width) horizline(width) vertline(width) print() #def funtionB(width): #def functionC(width): #def functionE(width): def main(): width=int(input("Please enter a width for the letter: ")) lenght=int(input("Please enter a lenght for the letter: ")) letter=input("Enter one of the capital letters: A,B,C,E ") if(width>=5 and width<=20): functionA functionB(width,length) functionC(width,length) functionE(width,length) else: print("You have entered an incorrect value") main()

    Read the article

  • when should i use multiple controllers in mvc?

    - by ajsie
    are there times you might want to use multiple controllers in mvc? eg. /controllers/foo.php /controllers/bar.php or /controllers/foo/baz1.php /controllers/foo/baz2.php /controllers/bar/baz1.php /controllers/bar/baz2.php could someone give some examples WHEN i might want to do that and some example controller names. one occasion i thought about might be when you got a main site (for users) and a admin site (for customers). all feedbacks and suggestions are appreciated

    Read the article

  • Should I start a General Software Developer User Group? [closed]

    - by Jeb
    I'm moving to a small town (Panama City, Florida) at some point in the future. I've found a Linux user group, and a .Net user group, but I'd like to spend my time outside of the office learning about Python, Android, JQuery -- mostly things that aren't owned by .Net. I'm debating trying to start another user group of some sort there, primarily to attract programmers who use technologies other than .Net. What are some of the more general programming user groups in existence already? I'm looking for something I could franchise.

    Read the article

  • Refresh a UITableView after loading

    - by Alavoil
    I am trying to load a table view from a cache very quickly and have the cached data in the table view appear. Then I want download new data, and then reload the table. Right now I am downloading the new data on viewDidAppear, but the view still refreshes before it displays. Any idea how I can do this?

    Read the article

  • TCP Tweaking options and Results: Any suggestions?

    - by krishnakumar
    I first tried with the default windows XP TCP option(It doesn't have TCPWindowSize option and TCP1323 in its Registry setting). I dynamically set those options using TCP optimizer. Here I list out the result with and without TCP Tweaking option. I see no major improvements in TCP after increasing window size optimally too. What value should I set to increase the performance? Results: Without any window size and MTU setting from server to client (receiving) TCPWindowSize : MTU : TTL: Size:586 MB total duration : 03:47 With window size extension from server to client (receiving) Bandwidth :100 Mbps Latency: 100ms BDP :1250000 TCPWindowSize : 1250000 MTU :1500 TTL:128 Size:586MB total duration : 03:44 With window size extension from server to client (receiving) TCPWindowSize :64240 MTU :1500 TTL :112 Size: 586MB total duration : 03:49

    Read the article

  • iPhone - how to store documents consisting of multiple images?

    - by Joe Strout
    My iPhone (actually, iPad) app creates documents that consist of several images, plus a bit of metadata. What's the best practice for storing these sorts of documents on disk? I see two main options: Create a folder for each document, and store my images as separate PNG files within the folder (plus another little file for the metadata). Create a single file which contains all images and metadata. But I'm not sure how to easily do option 2. I think I can convert my images in PNG format to/from NSData, but then what? I'm still a newbie at Cocoa, but I believe I saw something about stuffing mixed data into some NSSomethingOrOther and having this write itself out to disk, and read itself back in later. Does this ring a bell with anyone? And, will it work with large binary blobs of data like my images? Or would you recommend I simply go with option 1?

    Read the article

  • Reading email address from contacts fails with weird memory issue - Solved

    - by CapsicumDreams
    Hi all, I'm stumped. I'm trying to get a list of all the email address a person has. I'm using the ABPeoplePickerNavigationController to select the person, which all seems fine. I'm setting my ABRecordRef personDealingWith; from the person argument to - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { and everything seems fine up till this point. The first time the following code executes, all is well. When subsequently run, I can get issues. First, the code: // following line seems to make the difference (issue 1) // NSLog(@"%d", ABMultiValueGetCount(ABRecordCopyValue(personDealingWith, kABPersonEmailProperty))); // construct array of emails ABMultiValueRef multi = ABRecordCopyValue(personDealingWith, kABPersonEmailProperty); CFIndex emailCount = ABMultiValueGetCount(multi); if (emailCount > 0) { // collect all emails in array for (CFIndex i = 0; i < emailCount; i++) { CFStringRef emailRef = ABMultiValueCopyValueAtIndex(multi, i); [emailArray addObject:(NSString *)emailRef]; CFRelease(emailRef); } } // following line also matters (issue 2) CFRelease(multi); If compiled as written, the are no errors or static analysis problems. This crashes with a *** -[Not A Type retain]: message sent to deallocated instance 0x4e9dc60 error. But wait, there's more! I can fix it in either of two ways. Firstly, I can uncomment the NSLog at the top of the function. I get a leak from the NSLog's ABRecordCopyValue every time through, but the code seems to run fine. Also, I can comment out the CFRelease(multi); at the end, which does exactly the same thing. Static compilation errors, but running code. So without a leak, this function crashes. To prevent a crash, I need to haemorrhage memory. Neither is a great solution. Can anyone point out what's going on? Solution: It turned out that I wasn't storing the ABRecordRef personDealingWith var correctly. I'm still not sure how to do that properly, but instead of having the functionality in another routine (performed later), I'm now doing the grunt-work in the delegate method, and using the derived results at my leisure. The new (working) routine: - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person { // as soon as they select someone, return personDealingWithFullName = (NSString *)ABRecordCopyCompositeName(person); personDealingWithFirstName = (NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty); // construct array of emails [personDealingWithEmails removeAllObjects]; ABMutableMultiValueRef multi = ABRecordCopyValue(person, kABPersonEmailProperty); if (ABMultiValueGetCount(multi) > 0) { // collect all emails in array for (CFIndex i = 0; i < ABMultiValueGetCount(multi); i++) { CFStringRef emailRef = ABMultiValueCopyValueAtIndex(multi, i); [personDealingWithEmails addObject:(NSString *)emailRef]; CFRelease(emailRef); } } CFRelease(multi); return NO; }

    Read the article

  • Using AWT components inside a JInnerFrame (for JDesktopPane)

    - by Jack
    Hello, is there a way to hack bugs related to adding an AWT component (in my case a PApplet, so a processing language sketch) inside a JInternalFrame? It works but not as intended, since it flickers and dragging the frame causes repaint issues.. reading around it seems that, althrough it's possible to mix heavyweight (AWT) and lightweight (Swing) components some problems seem to be unavoidable.. is it true? Thanks!

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >