Daily Archives

Articles indexed Friday December 7 2012

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

  • error prepareForSegue between a viewController and a tableViewController

    - by beta
    -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"My_TableView"]) { MyTableViewController *destViewController = segue.destinationViewController; destViewController.data = data; } } Hi, I have a problem doing a segue (modal) between a ViewController to a TableViewController. The name of the segue between the ViewController and the NavigationController is "My_TableView". Compiler gives me this error: unrecognized selector sent to instance 0x9275b50 what's the problem?

    Read the article

  • Passing variables to functions in Python

    - by brno792
    Im writing test scripts in python for selenium web testing. How do I pass parameters through a python function to call in a later function? I first have a login test function. Then I have a new user registration function. Im trying to pass the Username and Password I use in the registration function to the testLogin function that I call inside the testRegister function. This is my python code: userName = "admin" password = "admin" #pass username and password variables to this function def testLogin(userName,password): browser = webdriver.Firefox() browser.get("http://url/login") element = browser.find_element_by_name("userName") element.send_keys(userName) element = browser.find_element_by_name("userPassword") element.send_keys(password) element.send_keys(Keys.RETURN) browser.close() # test registration def testRegister(): browser = webdriver.Firefox() browser.get("http://url/register") #new username variable newUserName = "test" element = browser.find_element_by_name("regUser") element.send_keys(newUserName) #new password variable newUserPassword = "test" element = browser.find_element_by_name("regPassword") element.send_keys(newUserPassword) # #now test if user is registered, I want to call testLogin with the test user name and pw. testLogin(newUserName,newUserPassword) browser.close()

    Read the article

  • Problems with viewing site in Internet Exploder

    - by Kevin
    I built a site and I'm just about finished. It displays properly in all the browsers I have (Safari, Chrome, and Firefox) but my client is not computer savvy at all and still uses Internet Explorer, so that's all he's using to view the site. I don't have IE to test the site so I've been using BrowserStack.com and I see in IE that the site is broken. The navigation bar has a white background and is pushed down a line, and the logo isn't appearing. Could anybody please assist me with figuring out why the site isn't displaying properly in IE, and how to fix it? Help is greatly appreciated. Thanks Site: WebuildCAhomes dot com

    Read the article

  • Composer does not find dependencies of vcs repository

    - by Michael Freund
    i've got a strange problem ... project-a is my main project. project-b is my library, checked in to subversion composer.json of project-b { "name": "fragger/baseclasses", "version" : "0.0.1-dev", "description": "Baseclasses and Interfaces", "require": { "silex/silex": "1.0.x-dev", "3rd-party/smarty": "3.*", "swiftmailer/swiftmailer": "4.2-dev" }, "autoload": { "psr-0": { "baseclasses": "src/" } } } and composer.json of project-b { "repositories" : [ { "type": "vcs", "url" : "svn+ssh://....." } ], "require": { "fragger/baseclasses": ">=0.0.1-dev" } } output of install command php composer.phar install Loading composer repositories with package information Installing dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for fragger/baseclasses >=0.0.1-dev -> satisfiable by fragger/baseclasses dev-trunk. - fragger/baseclasses dev-trunk requires silex/silex 1.0.x-dev -> no matching package found. But a composer install in project a alone, works fine

    Read the article

  • Selecting pictures with Jquery and Javascript

    - by Axschech
    I'm testing out a layout on a website using 3 pictures here: Schechterbusiness.info the left button works, making it go through the pictures. But I can't figure out how to get the right button to work, which is supposed to scroll through the other way. I know there's probably a way to do it with arrays but I can't wrap my brain around it. Halp! Code to scroll through pictures: $('#fryLink').click(function() { $('#hide').hide(); $('#img').hide(); count++; if(count == 1) { $('#img').attr("src","images/fry.png"); } else if(count == 2) { $('#img').attr("src","images/bender.png"); } else if(count == 3) { $('#img').attr("src","images/zoidberg.png"); } $('#img').show("fade"); if(count > 2) { count = 0; }

    Read the article

  • Add more strings in an object with php

    - by Nakome
    how can I add more strings in this object with php. I have managed to generate strings, but do not add more strings in an objects, nor remove the last comma. like this: Before, { "themes":[ { "name": "Amelia", "description": "Sweet and cheery.", "thumbnail": "http://bootswatch.com/amelia/thumbnail.png" } ] } After, { "themes":[ { "name": "juan", "description": "esto es un ejemplo.", "thumbnail": "http://example.com" }, { "name": "juan2", "description": "esto es un ejemplo2.", "thumbnail": "http://example2.com" }, ] } Thanks and sorry for my english.

    Read the article

  • PHP Foreach statement issue. Multiple rows are returned

    - by Daniel Patilea
    I'm a PHP beginner and lately i've been having a problem with my source code. Here it is: <html> <head> <title> Bot </title> <link type="text/css" rel="stylesheet" href="main.css" /> </head> <body> <form action="bot.php "method="post"> <lable>You:<input type="text" name="intrebare"></lable> <input type="submit" name="introdu" value="Send"> </form> </body> </html> <?php //error_reporting(E_ALL & ~E_NOTICE); mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("robo") or die(mysql_error()); $intrebare=$_POST['intrebare']; $query = "SELECT * FROM dialog where intrebare like '%$intrebare%'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); ?> <div id="history"> <?php foreach($row as $rows){ echo "<b>The robot says: </b><br />"; echo $row['raspuns']; } ?> </div> It returns me the result x6 times. This problem appeared when I've made that foreach because I wanted the results to stuck on the page one by one after every sql querry. Can you please tell me what seems to be the problem? Thanks!

    Read the article

  • How can I make Delphi packages (create a .bpl file)?

    - by Pharaoh
    I want to create *.bpl file but I am failing to do so. Specifically, I am trying to make JEDI plugins, but I have tried an empty pure Delphi package, too. If I create a new package in Delphi XE3, I get an empty unit - if I "make" this project called "Package1.bpl", I get a .dcu file in "debug/win32/", but no .bpl file. No error is reported by the compiler. An empty JEDI plugin (bpl-style) only gives a .dcu, too, while an empty dll-style JEDI plugin gives a .cdu and a .dll file in "debug/win32/". This is the first time I am tryimg to make a new package, so I am completely lost. What am I missing? Pharaoh

    Read the article

  • strcat() won't exit

    - by Tristan Sebens
    I'm trying to implement a very basic server in C, one part of which is constructing HTTP headers. To do this I have written a class called header_builder, which basically constructs the headers for me. One of the most basic methods of this class is append_header_line, shown below: void append_header_line( const char *line, char *hdr ) { printf("Adding header line\n"); strcat( hdr, line ); printf("Line added. Adding ending.\n"); strcat( hdr, "\r\n" ); printf("Success\n"); } All it's supposed to do is tack the "line" parameter onto the end of the "hdr" parameter, and then add "\r\n" to the end of it all. The problem is that the first strcat call never exits. When I run this code, all it does is say: Adding header line Which means that the following lines never execute, and I can't figure out why. Any thoughts?

    Read the article

  • find substring and indices in mips

    - by ccc
    im trying find out substring and first occurrence indices. but something wrong. im comparing each element of pattern array and each element of string array until pointer reach to '\0'. and if any characater found it keep in temp array. and increasing pointers +1. whats the problem. algorithm is totaly wrong ? #Note: $v0 is a symbolic name used by the assember for $2. # $a0 is a symbolic name used by the assember for $4. .data prompt_str: .asciiz "Please type a text string: " prompt_ptr: .asciiz "Please type a pattern string: " print_yes: .asciiz "Yes, there is a match." print_no: .asciiz "No, there is no match." text_str: .asciiz "Text string : " pattern_str: .asciiz "Pattern string : " print_out: .asciiz "Output to be produced :" print_dash: .asciiz "----------------------" print_index: .asciiz "Starting index :" print_msg : .asciiz "Length of longest partial match = " nl: .asciiz "\n" str : .space 81 ptr : .space 81 tmp : .space 81 .text main: la $a0, prompt_str li $v0, 4 #print_string command. syscall la $a0,str #read string li $a1,81 li $v0,8 syscall la $t0,str #move string to $t0 la $a0,prompt_ptr li $v0,4 #print pattern command syscall la $a0,ptr #read pattern li $a1,81 li $v0,8 syscall la $t1,ptr #move pattern to $t1 la $t5,tmp #move temp to $t5 lb $t2,0($t0) #pointer first element array of string lb $t3,0($t1) #pointer first element array of pattern lb $t6,0($t5) #pointer first element array of temp loop : beq $t3,$0,end_loop beq $t2,$t3,match addiu $t0,$t0,1 j loop match : move $t6,$t2 addiu $t5,$t5,1 addiu $t0,$t0,1 addiu $t1,$t1,1 j print_match print_match : la $a0,text_str #print string li $v0,4 syscall move $a0,$t0 li $v0,4 syscall la $a0,nl #print newline character li $v0,4 syscall la $a0,pattern_str #print pattern string li $v0,4 syscall move $a0,$t1 li $v0,4 syscall la $a0,nl #print newline character li $v0,4 syscall la $a0,print_out #print output line and newline character li $v0,4 syscall la $a0,nl li $v0,4 syscall la $a0,print_dash li $v0,4 syscall la $a0,print_yes li $v0,4 syscall la $a0,print_index #print starting index li $v0,4 syscall li $v0,10 syscall end_loop : li $v0,10 syscall

    Read the article

  • C#: Searching through arrays

    - by Jonathan Oberhaus
    I have a dvd app that stores dvds and blu-rays, I want to search the arrays by director. Below is the code for the inventory class I have seen many different ways to do this. There seems to be some debate as the best/most efficient way to accomplish this, any suggestions? Blockquote namespace MovieInventoryApplication { class Inventory { public Bluray[] BlurayMovies; public DVD[] DVDMovies; private int blurayCount; private int dvdCount; public Inventory() { BlurayMovies = new Bluray[5]; DVDMovies = new DVD[5]; blurayCount = 0; dvdCount = 0; } public void AddBluray() { String strTitle; int intReleaseYear; int intRunningTimeMinutes; String strDirector; int intPrice; int intRegionCode; try { Console.Write("Enter a title: "); strTitle = Console.ReadLine(); Console.Write("Enter a release year: "); intReleaseYear = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter the running time in minutes: "); intRunningTimeMinutes = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter the directors name: "); strDirector = Console.ReadLine(); Console.Write("Enter a rental price: "); intPrice = Convert.ToInt32(Console.ReadLine()); BlurayMovies[blurayCount] = new Bluray(strTitle, intReleaseYear, intRunningTimeMinutes, strDirector, intPrice); blurayCount++; Console.Write("Enter the DVD region code: "); intRegionCode = Convert.ToInt32(Console.ReadLine()); DVDMovies[dvdCount] = new DVD(strTitle, intReleaseYear, intRunningTimeMinutes, strDirector, intPrice, intRegionCode); dvdCount++; } catch (FormatException FormatException) { Console.WriteLine(FormatException.Message); Console.WriteLine("Please enter a number in this field."); } } public void AddDVD() { String strTitle; int intReleaseYear; int intRunningTimeMinutes; String strDirector; int intPrice; int intRegionCode; try { Console.Write("Enter a title: "); strTitle = Console.ReadLine(); Console.Write("Enter a release year: "); intReleaseYear = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter the running time in minutes: "); intRunningTimeMinutes = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter the directors name: "); strDirector = Console.ReadLine(); Console.Write("Enter a rental price: "); intPrice = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter the region code: "); intRegionCode = Convert.ToInt32(Console.ReadLine()); DVDMovies[dvdCount] = new DVD(strTitle, intReleaseYear, intRunningTimeMinutes, strDirector, intPrice, intRegionCode); dvdCount++; } catch (FormatException FormatException) { Console.WriteLine(FormatException.Message); Console.WriteLine("Please enter a number in this field."); } } public void ListAllBluray() { int position = 0; while (BlurayMovies[position] != null) { Console.WriteLine(position + " " + BlurayMovies[position].strTitle); position++; } } public void ListAllDVD() { int position = 0; while (DVDMovies[position] != null) { //position + 1 + " " + Console.WriteLine(position + " " + DVDMovies[position].strTitle); position++; } } public void BlurayInfo(int position) { Console.WriteLine("Title: {0}", DVDMovies[position].strTitle); Console.WriteLine("Release Year: {0}", DVDMovies[position].intReleaseYear); Console.WriteLine("Running Time (Minutes): {0}", DVDMovies[position].intRunningTimeMinutes); Console.WriteLine("Director: {0}", DVDMovies[position].strDirector); Console.WriteLine("Price: {0}", DVDMovies[position].intPrice); } public void DVDInfo(int position) { Console.WriteLine("Title: {0}", DVDMovies[position].strTitle); Console.WriteLine("Release Year: {0}", DVDMovies[position].intReleaseYear); Console.WriteLine("Running Time (Minutes): {0}", DVDMovies[position].intRunningTimeMinutes); Console.WriteLine("Director: {0}", DVDMovies[position].strDirector); Console.WriteLine("Price: {0}", DVDMovies[position].intPrice); Console.WriteLine("Region Code: {0}", DVDMovies[position].intRegionCode); } } }

    Read the article

  • Visitor Pattern can be replaced with Callback functions?

    - by getit
    Is there any significant benefit to using either technique? In case there are variations, the Visitor Pattern I mean is this: http://en.wikipedia.org/wiki/Visitor_pattern And below is an example of using a delegate to achieve the same effect (at least I think it is the same) Say there is a collection of nested elements: Schools contain Departments which contain Students Instead of using the Visitor pattern to perform something on each collection item, why not use a simple callback (Action delegate in C#) Say something like this class Department { List Students; } class School { List Departments; VisitStudents(Action<Student> actionDelegate) { foreach(var dep in this.Departments) { foreach(var stu in dep.Students) { actionDelegate(stu); } } } } School A = new School(); ...//populate collections A.Visit((student)=> { ...Do Something with student... }); *EDIT Example with delegate accepting multiple params Say I wanted to pass both the student and department, I could modify the Action definition like so: Action class School { List Departments; VisitStudents(Action<Student, Department> actionDelegate, Action<Department> d2) { foreach(var dep in this.Departments) { d2(dep); //This performs a different process. //Using Visitor pattern would avoid having to keep adding new delegates. //This looks like the main benefit so far foreach(var stu in dep.Students) { actionDelegate(stu, dep); } } } }

    Read the article

  • Android Sqlite - obtaining the correct database row id

    - by Dan_Dan_Man
    I'm working on an app that allows the user to create notes while rehearsing a play. The user can view the notes they have created in a listview, and edit and delete them if they wish. Take for example the user creates 3 notes. In the database, the row_id's will be 1, 2 and 3. So when the user views the notes in the listview, they will also be in the order 1, 2, 3 (intially 0, 1, 2 before I increment the values). So the user can view and delete the correct row from the database. The problem arises when the user decides to delete a note. Say the user deletes the note in position 2. Thus our database will have row_id's 1 and 3. But in the listview, they will be in the position 1 and 2. So if the user clicks on the note in position 2 in the listview it should return the row in the database with row_id 3. However it tries to look for the row_id 2 which doesn't exist, and hence crashes. I need to know how to obtain the corresponding row_id, given the user's selection in the listview. Here is the code below that does this: // When the user selects "Delete" in context menu public boolean onContextItemSelected(MenuItem item) { AdapterContextMenuInfo info = (AdapterContextMenuInfo) item .getMenuInfo(); switch (item.getItemId()) { case DELETE_ID: deleteNote(info.id + 1); return true; } return super.onContextItemSelected(item); } // This method actually deletes the selected note private void deleteNote(long id) { Log.d(TAG, "Deleting row: " + id); mNDbAdapter.deleteNote(id); mCursor = mNDbAdapter.fetchAllNotes(); startManagingCursor(mCursor); fillData(); // TODO: Update play database if there are no notes left for a line. } // When the user clicks on an item, display the selected note protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); viewNote(id, "", "", true); } // This is where we display the note in a custom alert dialog. I've ommited // the rest of the code in this method because the problem lies in this line: // "mCursor = mNDbAdapter.fetchNote(newId);" // I need to replace "newId" with the row_id in the database. private void viewNote(long id, String defaultTitle, String defaultNote, boolean fresh) { final int lineNumber; String title; String note; id++; final long newId = id; Log.d(TAG, "Returning row: " + newId); mCursor = mNDbAdapter.fetchNote(newId); lineNumber = (mCursor.getInt(mCursor.getColumnIndex("number"))); title = (mCursor.getString(mCursor.getColumnIndex("title"))); note = (mCursor.getString(mCursor.getColumnIndex("note"))); . . . } Let me know if you would like me to show anymore code. It seems like something so simple but I just can't find a solution. Thanks!

    Read the article

  • C Typecast: How to

    - by Jean
    #include<stdio.h> int main(void) { unsigned short a,e,f ; // 2 bytes data type unsigned int temp1,temp2,temp4; // 4 bytes data type unsigned long temp3; // 8 bytes data type a=0xFFFF; e=((a*a)+(a*a))/(2*a); // Line 8 //e=(((unsigned long)(a*a)+(unsigned long)(a*a)))/(unsigned int)(2*a); temp1=a*a; temp2=a*a; temp3=(unsigned long)temp1+(unsigned long)temp2; // Line 14 temp4=2*a; f=temp3/temp4; printf("%u,%u,%lu,%u,%u,%u,%u\n",temp1,temp2,temp3,temp4,e,f,a); return(1); } How do I fix the arithmetic (At Line 8 by appropriate typecasting of intermediate results) so that overflows are taken care of ? Currently it prints 65534 instead of expected 65535. Why is the typecast necessary for Line 14 ?

    Read the article

  • Html Agility Pack get all elements by class

    - by Adam
    I am taking a stab at html agility pack and having trouble finding the right way to go about this. For example: var findclasses = _doc.DocumentNode.Descendants("div").Where(d => d.Attributes.Contains("class")); However, obviously you can add classes to a lot more then divs so I tried this.. var allLinksWithDivAndClass = _doc.DocumentNode.SelectNodes("//*[@class=\"float\"]"); But that doesn't handle the cases where you add multiple classes and "float" is just one of them like this.. class="className float anotherclassName" Is there a way to handle all of this? I basically want to select all nodes that have a class = and contains float.

    Read the article

  • Checkboxes and Radio Buttons Together in a JTree

    - by Thunderforge
    I'd like to create a JTree that more or less has the following structure (with a hidden root node) [No Option] Main Dish [Radio Button] Steak [Radio Button] Fish [Radio Button] Filet Mignon [Checkbox] Side Dish [Checkbox] Mashed Potatoes [Checkbox] Green Beans [Checkbox] Mixed Vegetables [Checkbox] Dessert [Radio Button] Ice Cream [Radio Button] Pudding [Radio Button] Cake Basically, at least one main dish (but no more than one) can be chosen, any number of side dishes can be chosen (or none, if the "Side Dish" checkbox is unchecked), and only one dessert can be chosen (or none, if the "Dessert" checkbox is unchecked). This article describes how to create a tree that uses JCheckboxes (as I'd like to use for the Side Dish and Dessert sections) by creating a custom Renderer and page 3 of the same article describes how to use Radio buttons (as I'd like to use for the Main Course) section. But it doesn't describe how to mix them up within the same JTree. Is it possible to create a structure like this? And if so, how?

    Read the article

  • jQuery carousel in a div with display:none

    - by Fred Kafka
    I have to use on my site a jQuery responsive carousel with 4 displayed items that slide one at a time, etc etc. The point is: this carousel is placed in a div with display:none and it appears clicking on a button with a slideToggle script (jQuery). Well, when the div appears the carousel is not displayed. Nothing! Notice that if I remove the display:none the carousel shows perfectly. I've tried a bunch of carousel plugin (bxslider, caroufredsel, elastislide, flexslider) and this issue happens for all of them. And then... I'm going crazy!! Excuse meSorry friends, here is the code: HTML (here is the case of FlexSlider but the code is similar for the other plugins) <div id="hiddenDiv"> <div id="hiddenDivInner"> <div class="flexslider"> <ul class="slides"> <li>...</li> <li>...</li> <li>...</li> </ul> </div> </div> </div> CSS #hiddenDiv{ display:none; padding-bottom:10px; background: url("../img/xxx.gif") repeat left bottom #FFFFFF; } SCRIPT (copy-paste from the site. This script is between $(document).ready together with other scripts. Alredy tried to remove the load function) $(window).load(function() { $('.flexslider').flexslider({ animation: "slide", animationLoop: false, itemWidth: 300, itemMargin: 5, minItems: 1, maxItems: 4 }); }); $("#trigger").click(function () { $("#hiddenDiv").slideToggle(400, "easeInOutExpo"); }); I remind you that with this code and no display:none every carousels work, also if I slide up and then down the div using the slideToggle button (#trigger).

    Read the article

  • Writing data into New NFC Tag not works?

    - by Nagaraj436
    I am Newbie to NFC Android App Development. I am done with the App development and everything worked fine. As part of my testing I used MifareClassic as well MifareDesfire tags to write and read. I am storing data in Ndef format. Initially I used the above testing tags with other apps like Nxp tagwriter and Tagstand Tagwriter and then I used with My app. So everything worked fine. Even later I used my app to write and read data from Sony Felica tags(new tags) which also worked fine. So I passed app to client for review but I came to know that app is not writing on New Tags. If they are reset from other apps then It works fine. So I done the same test here and found the same issue as client reported. What might be the issue? Has someone come across same kind of issue? Is it required to format before using? if so how to do that? Someone Help to solve the issue. Thanks in Advance.

    Read the article

  • WPF ToolTip Style with dynamic LayoutTransform

    - by NoOne
    I have an app that scales it's UI and I want to scale the ToolTips with it. I have tried doing this: <Style TargetType="{x:Type ToolTip}"> <Setter Property="LayoutTransform" Value="{DynamicResource scaleTransf}"/> ... </Style> ...where scaleTransf is a resource that I change via code: Application.Current.Resources["scaleTransf"] = new ScaleTransform(...); Most of the ToolTips do get scaled in size but some of them that are created by C# code don't get scaled. I've checked and it seems that I don't set their Style or LayoutTransform by code, so I don't really understand what is going wrong... Moreover, I have the impression that the above XAML code worked fine a few days ago. :( Is there sth I can do to make it work all the time without setting the LayoutTransform in code-behind? EDIT : The ToolTips that don't change scale are the ones that have become visible before. EDIT2 : Extra code: <ScaleTransform x:Key="scaleTransf" ScaleX="1" ScaleY="1"/> I have also tried this: Application.Current.Resources.Remove("scaleTransf"); Application.Current.Resources.Add("scaleTransf", new ScaleTransform(val, val)); EDIT3 : My attempt to solve this using a DependencyProperty: In MainWindow.xaml.cs : public static readonly DependencyProperty TransformToApplyProperty = DependencyProperty.Register("TransformToApply", typeof(Transform), typeof(MainWindow)); public Transform TransformToApply { get { return (Transform)this.GetValue(TransformToApplyProperty); } } Somewhere in MainWindow, in response to a user input: this.SetValue(TransformToApplyProperty, new ScaleTransform(val, val)); XAML Style: <Style TargetType="{x:Type ToolTip}"> <Setter Property="LayoutTransform" Value="{Binding TransformToApply, ElementName=MainWindow}"/> ... Using this code, not a single one of the ToolTips seem to scale accordingly.

    Read the article

  • How to change password hashing algorithm when using spring security?

    - by harry
    I'm working on a legacy Spring MVC based web Application which is using a - by current standards - inappropriate hashing algorithm. Now I want to gradually migrate all hashes to bcrypt. My high level strategy is: New hashes are generated with bcrypt by default When a user successfully logs in and has still a legacy hash, the app replaces the old hash with a new bcrypt hash. What is the most idiomatic way of implementing this strategy with Spring Security? Should I use a custom Filter or my on AccessDecisionManager or …?

    Read the article

  • Passing models between controllers in MVC4

    - by wtfsven
    I'm in the middle of my first foray into web development with MVC4, and I've run into a problem that I just know is one of the core issues in web development in general, but can't seem to wrap my mind around it. So I have two models: Employee and Company. Employee has a Company, therefore /Employee/Create contains a field that is either a dropdown list for selecting an existing Company, or an ActionLink to /Company/Create if none exists. But here's the issue: If a user has to create a Company, I need to preserve the existing Employee model across both Views--over to /Company/Create, then back to /Employee/Create. So my first approach was to pass the Employee model to /Company/Create with a @Html.ActionLink("Add...", "Create", "Organization", Model , null), but then when I get to Company's Create(Employee emp), all of emp's values are null. The second problem is that if I try to come back to /Employee/Create, I'd be passing back an Employee, which would resolve to the POST Action. Basically, the whole idea is to save the state of the /Employee/Create page, jump over to /Company/Create to create a Company record, then back to /Employee/Create to finish creating the Employee. I know there is a well understood solution to this because , but I can't seem to phase it well enough to get a good Google result out of it. I've though about using Session, but it seems like doing so would be a bit of a kludge. I'd really like an elegant solution to this.

    Read the article

  • iOS6 Simulator MKMapKit "Couldn't find default.styleproto in framework"

    - by abellina
    Running my app with the iOS6 simulator I am getting the following printed in the XCode console prior to viewDidLoad getting called: Couldn't find default.styleproto in framework Has anyone else encountered this, and if so have you found a reason why? My guess is that it has to do with the iOS6 Apple Maps, but who knows! EDIT I should add that I don't get this warning in the iOS 5.1 simulator.

    Read the article

  • Compile a binary file for linking OSX

    - by Satpal
    I'm trying to compile a binary file into a MACH_O object file so that it can be linked it into a dylib. The dylib is written in c/c++. On linux the following command is used: ld -r -b binary -o foo.o foo.bin I have tried various option on OSX but to no avail: ld -r foo.bin -o foo.o gives: ld: warning: -arch not specified ld: warning: ignoring file foo.bin, file was built for unsupported file format which is not the architecture being linked (x86_64) An empty .o file is created ld -arch x86_64 -r foo.bin -o foo.o ld: warning: ignoring file foo.bin, file was built for unsupported file format which is not the architecture being linked (x86_64) Again and empty .o file is created. Checking the files with nm gives: nm foo.o nm: no name list The binary file is actually, firmware that will be downloaded to an external device. Thanks for looking

    Read the article

  • Is there a SaaS for logging user activity?

    - by JoshL
    In almost every app that I build I create some kind of user log table to log various activities that my actual USERS (not visitors, but someone with an account) perform on the site. This is primarily used for customer service issues to allow me to pull up a record of the pages and actions that a user has visited. The downside to this is the size of the UserLogs table. It gets immense. I'm not sure if it is common practice or not for others to log INDIVIDUAL (not aggregate like Google Analytics) user behavior to a database, but if it is I'm wondering if any form of a SaaS exists to help offload this task? I essentially need a RESTful API that lets me store and retrieve individual user activity quickly and securely. Anyone know of any or am I the only one who has this issue?

    Read the article

  • Getting the hang of CodeIgniter - Templating / loading views

    - by kilrizzy
    Attempting to learn CI and going through the docs to get a better understanding. Without getting a separate library, I could make a template by including a list of views like so: $this->load->view('header'); $this->load->view('navigation'); $this->load->view('sidenav_open'); $this->load->view('blocks/userinfo'); $this->load->view('blocks/stats'); $this->load->view('sidenav_close'); $this->load->view('content',$data); $this->load->view('footer'); This makes sense but would I actually have that on each of my controllers (pages)? Not sure if there is a way to include this in the initial controller (welcome) and then in the others somehow reference it? Or perhaps there is something I am missing completely

    Read the article

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