Search Results

Search found 15621 results on 625 pages for 'creating'.

Page 74/625 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • Creating PHP strings using other variables...works manually, can't figure out how automatically

    - by Matt
    Hello, I'm trying to get a variable to be formed automatically using data pulled from a mysql database. I know the data is being pulled from the database in some form resembling its original form, but that data does not act the same as data that is manually typed and assigned to a string. For example, if a cell in a mysql table says... I said "goodbye" before I left. She also said "goodbye." ...and I manually copy/paste it and add the necessary escapes... $string1 = " I said \"goodbye\" before I left. She also said \"goodbye.\" "; ...that does not equal... $string1 = $mysqlResultArray['specificCellWithQuoteShownAbove'] Interestingly, if I echo both versions of $string1 and view the output, they appear to be exactly the same. But they do not function the same when put through various functions I've created. The functions only work if I do the manual copy/paste method--which is not what I want, obviously. I'm not sure if it has to do with the line breaks or the escapes--or some combination of the two. But while both strings are superficially the same, they are apparently functionally different and I don't know why. So how can I create $string1 without manually copy/pasting the contents from the mysql entry and instead querying for the data and assigning it to $string1 in such a way that it's exactly functionally equivalent as the manual copy/pasted string?

    Read the article

  • Creating a pie chart for an app

    - by jhodgson4
    I'm developing an app which requires a pie chart to display a set number of modules. The modules need to be clickable, sending a value to the database for how many times the module has been clicked. The slices will change color etc depending on this database value. The slices will always be equal in size. All simple stuff. My question is what charting system would you use. I've been looking at google charts but I have no way of registering a value in a slice without changing its 'weight' in the chart. So ideally I would like to add data-stage="2" to each slice that I can access with a custom method. Also google charts seems quite heavy for what I need? Any advice would be greatly appreciated. Joe

    Read the article

  • C#: Creating an editable object inside a PictureBox

    - by ET
    My goal is to let the user click on a specific location on a map to add a Placemark, and then edit the placemark by click its icon (change its name, move it around, etc). I am using a PictureBox to show the map, and by registering the MouseDoubleClick event I am drawing an Image on the map with GDI+ DrawImage() method. The problem is that after the placemark's Image was drawn, it does not editable: the user cant click the icon and move it around, change its name etc. Is there any other design pattern I can follow? maybe using other controls... ?

    Read the article

  • Creating an AJAX Form for a Polymorphic Object in Rails

    - by Isaac Yerushalmi
    I am trying to create an AJAX form for a polymorphic associated model. I created "Comments" which have a polymorphic association with all objects you can comment on (i.e. user profiles, organization profiles, events, etc). I can currently add comments to objects using a form created by: form_for [@commentable, @comment] do |f| I am trying to make this form via Ajax but I keep getting errors. I've tried at least ten different pieces of code, using remote_form_tag, remote_form_for, etc..with all different options, and nothing works. The comment does not get inserted into the database. Can anyone please tell me how I can make the above form ajax-enabled?

    Read the article

  • creating and returning an array from a method

    - by Troy
    howdy, i currently have a method that checks what is around the centre item in a 3x3 grid, if what is in the 8 adjacent positions is containing what i am checking for i want to mark that square on an array with length 7 as being 1. to do this i need to create and return an array in my method, is it possible to do this?

    Read the article

  • Function for creating color wheels

    - by lbrandy
    This is something I've pseudo-solved many times and never quite found a solution that's stuck with me. The problem is to come up with a way to generate N colors that are as distinguishable as possible where N is a parameter.

    Read the article

  • Creating an interface and swappable implementations in python

    - by Blankman
    Hi, Would it be possible to create a class interface in python and various implementations of the interface. Example: I want to create a class for pop3 access (and all methods etc.). If I go with a commercial component, I want to wrap it to adhere to a contract. In the future, if I want to use another component or code my own, I want to be able to swap things out and not have things very tightly coupled. Possible? I'm new to python.

    Read the article

  • Cocoa touch - creating view template for iPad

    - by teepusink
    Hi, This is kinda a hard question to describe. I'm just starting to make an iPad app. Now with the amount of real estate I have, I'm planning to have different but similar "views" to populate the space. (might be easier to think a newspaper site, where many of the columns are similar) I would like to create a "view template" so I can reuse the view in the different spots. Is it possible to design the view template in Interface Builder? (meaning I design the UIView in Interface Builder and then somehow I can just do [window addSubview:viewController.viewTemplate1]; multiple times? If so how would I load that view template in the different places? If you know of an example code / tutorial that does something similar, that would work too. Thanks, Tee

    Read the article

  • Creating a menu to switch languages on site

    - by user342391
    I have a dropdown menu on my site that I want to use to switch between the different languages: <select onChange="if(this.selectedIndex!=0) self.location=this.options[this.selectedIndex].value" name="userLanguage" id="userLanguage"> <option value="http://demo.com/?lang=en"> English (International)</option> <option value="http://demo.com/?lang=es"> Español (European)</option> </select> How can I get the above menu to display which language is currently showing. Is there someway of showing an active state. Site is using php. Thanks in advance.

    Read the article

  • Creating custom model using other models in ASP.NET MVC

    - by Soham Dasgupta
    As the title suggests I have two models Products And Orders which are actually two table in my database and I have used a LINQ to SQL class to create there models. Now I wan to create a model named "OrderDetails" which will have properties from both the model like product name and id from product and Order number from orders something like this. An then I want to create a view from this custom model and from which I want to add "CRUD" operation. What should be my approach. And in many scenarios I may have to use data from more than 4 models. Please help. I'm wondering helplessly and I have only two days experience in ASP.NET MVC.

    Read the article

  • Creating object/array to method in request based on __gettypes in PHP

    - by LochNess
    I'm having trouble with the array or object that should be passed based on the response from __gettypes. The __gettypes response: [0] => struct CDataWrapper { schema;any; } [1] => struct NewMember { MemberDetail MemberDetails;ArrayOfHobby Hobbies; } [2] => struct MemberDetail { string Name; string Age; string Sex; } [3] => struct ArrayOfHobby { Hobby Hobby; } [4] => struct Hobby { string Name; string HoursUsedOnHobbyWeekly;boolean Favourite; } ... etc. The methods are: [0] => ReceiveMemberResponse ReceiveMember(ReceiveMember $parameters) [1] => ReturnMemberResponse ReturnMember(ReturnMember $parameters) So far I have this PHP: $client = new SoapClient('http://domain.com?wsdl'); class MemberDetail { public $Name = ''; public $Age = ''; public $Sex = ''; } $mc = new MemberDetail(); $mc->Name= 'Bob'; $mc->Age= '14'; $mc->Sex= 'Male'; $myParam = array('ReceiveMember'=>$mc); $wcf = $client->ReceiveMember($myParam); $wcfResult = $wcf->ReturnMember; print_r($wcfResult) when i call the page it returns: Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error. I'm not really sure how to create the array or object to pass on as $myParam since im no expert with PHP either.

    Read the article

  • Creating a view linking three different node types with two node references

    - by mikesir87
    I have the following content types: Camp - the top level type Registration Information - contains node reference to Camp called Camp Medical Release Form - contains node reference to registration information called Camper I would like to create a View that takes the nid for the Camp, and pulls out all the fields for the Registration Info and Medical Release Form. I'm having trouble figuring out how to set up the various arguments/relationships. I haven't done something that's referenced more than two types. I know it would be smart/best to just combine the Registration Info and Medical Release Form, since it's a 1:1 mapping, but we can't. So... any help would be appreciated!

    Read the article

  • How do I map repeating columns in NHibernate without creating duplicate properties

    - by Ian Oakes
    Given a database that has numerous repeating columns used for auditing and versioning, what is the best way to model it using NHibernate, without having to repeat each of the columns in each of the classes in the domain model? Every table in the database repeats these same nine columns, the names and types are identical and I don't want to replicate it in the domain model. I have read the docs and I saw the section on inheritance mapping but I couldn't see how to make it work in this scenario. This seems like a common scenario because nearly every database I've work on has had the four common audit columns (CreatedBy, CreateDate, UpdatedBy, UpdateDate) in nearly every table. This database is no different except that it introduces another five columns which are common to every table.

    Read the article

  • Creating a Maze using Java

    - by user356184
    Im using Java to create a maze of specified "rows" and "columns" over each other to look like a grid. I plan to use a depth-first recursive method to "open the doors" between the rooms (the box created by the rows and columns). I need help writing a openDoor method that will break the link between rooms.

    Read the article

  • Creating a virtual, data-driven section of a Wordpress-powered site

    - by lgomez
    Hello all, I want to create a plugin for wordpress to automatically serve pages containing data pulled from a provider's API. The API returns one or more records containing data for that record and I simply want to have the plugin intercept the request, call the API with parameters pulled from the request URI and display the data using a template that I can either let them upload to the server or let them copy and paste into the plugins admin settings. For example, I may want one of my wordpress installations to show products pulled from such an API under the url "example.com/products". The plugin would catch that request, extract the variables from the URL, call the API and render the template with the returned results. I'd like to avoid requiring editing the .htaccess file like some caching plugins do. Some of the admins of these pages won't know how to do that or simply won't have access to the .htaccess file. Thanks!

    Read the article

  • VB Script Creating variable on the fly returned Error Automation type not supported

    - by chazzuka
    I have list of variables in an include files which is looks like: var_1 = "string" var_2 = "string" on the main file i need variable created on the fly so i do ' somewhere i have the num variable Execute("new_var = var_"&num) Exactly on the execute line i got this error Microsoft VBScript runtime error '800a01ca' Variable uses an Automation type not supported in VBScript Any idea guys? thanks

    Read the article

  • Creating a db driven primary navigation in django?

    - by Fedor
    I find that it's pretty common most people hardcode the navigation into their templates, but I'm dealing with a pretty dynamic news site which might be better off if the primary nav was db driven. So I was thinking of having a Navigation model where each row would be a link. link_id INT primary key link_name varchar(255) url varchar(255) order INT active boolean If anyone's done something similar in the past, would you say this sort of schema is good enough? I also wanted for there to be an optional dropdown in the admin near the url field so that a user could choose a Category model's slug since category links would be common, but I'm not quite sure how that would be possible.

    Read the article

  • Binary serialization and deserialization without creating files (via strings)

    - by the_V
    Hi, I'm trying to create a class that will contain functions for serializing/deserializing objects to/from string. That's what it looks like now: public class BinarySerialization { public static string SerializeObject(object o) { string result = ""; if ((o.GetType().Attributes & TypeAttributes.Serializable) == TypeAttributes.Serializable) { BinaryFormatter f = new BinaryFormatter(); using (MemoryStream str = new MemoryStream()) { f.Serialize(str, o); str.Position = 0; StreamReader reader = new StreamReader(str); result = reader.ReadToEnd(); } } return result; } public static object DeserializeObject(string str) { object result = null; byte[] bytes = System.Text.Encoding.ASCII.GetBytes(str); using (MemoryStream stream = new MemoryStream(bytes)) { BinaryFormatter bf = new BinaryFormatter(); result = bf.Deserialize(stream); } return result; } } SerializeObject method works well, but DeserializeObject does not. I always get an exception with message "End of Stream encountered before parsing was completed". What may be wrong here?

    Read the article

  • Creating a Calender in PHP

    - by Chris T
    Are there any APIs/Libraries that make it easy to generate a calender for a certain month/year? I need to have some sort of admin interface for a "event planner" part of a CMS for a local youth group and I'm at a loss as to how to generate a decent calender.

    Read the article

  • Creating rapid function overloads in C++

    - by DeadMG
    template<typename Functor, typename Return, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8, typename Arg9, typename Arg10> class LambdaCall : public Instruction { public: LambdaCall(Functor func ,unsigned char constructorarg1 ,unsigned char constructorarg2 ,unsigned char constructorarg3 ,unsigned char constructorarg4 ,unsigned char constructorarg5 ,unsigned char constructorarg6 ,unsigned char constructorarg7 ,unsigned char constructorarg8 ,unsigned char constructorarg9 ,unsigned char constructorarg10) : arg1(constructorarg1) , arg2(constructorarg2) , arg3(constructorarg3) , arg4(constructorarg4) , arg5(constructorarg5) , arg6(constructorarg6) , arg7(constructorarg7) , arg8(constructorarg8) , arg9(constructorarg9) , arg10(constructorarg10) , function(func) {} void Call(State& state) { state.Push<Return>(func(*state.GetRegisterValue<Arg1>(arg1) ,*state.GetRegisterValue<Arg1>(arg1) ,*state.GetRegisterValue<Arg2>(arg2) ,*state.GetRegisterValue<Arg3>(arg3) ,*state.GetRegisterValue<Arg4>(arg4) ,*state.GetRegisterValue<Arg5>(arg5) ,*state.GetRegisterValue<Arg6>(arg6) ,*state.GetRegisterValue<Arg7>(arg7) ,*state.GetRegisterValue<Arg8>(arg8) ,*state.GetRegisterValue<Arg9>(arg9) ,*state.GetRegisterValue<Arg10>(arg10) )); } Functor function; unsigned char arg1; unsigned char arg2; unsigned char arg3; unsigned char arg4; unsigned char arg5; unsigned char arg6; unsigned char arg7; unsigned char arg8; unsigned char arg9; unsigned char arg10; }; Then again for every possible number of arguments I want to support, and again for void returns. Any way to do this faster?

    Read the article

  • Declaring and creating an object then adding to collection VS Adding object to collection using new

    - by ZeeMan
    Ok so the title may have been confusing so i have posted 2 code snippets to illustrate what i mean. NOTE: allUsers is just a collection. RegularUser regUser = new RegularUser(userName, password, name, emailAddress); allUsers.Add(regUser); VS allUsers.Add(new RegularUser(userName, password, name, emailAddress)); Which snippet A or B is better and why? What are the advantages or disadvantages? The example i wrote was C# but does the language (C#, Java etc) make a difference?

    Read the article

  • Creating LINQ to SQL for counting a parameter

    - by Matt
    I'm trying to translate a sql query into LINQ to SQL. I keep getting an error "sequence operators not supported for type 'system.string'" If I take out the distinct count part, it works. Is it not because I'm using the GROUP BY? SELECT COUNT(EpaValue) AS [Leak Count], Location, EpaValue AS [Leak Desc.] FROM ChartMes.dbo.RecourceActualEPA_Report WHERE (EpaName = N'LEAK1') AND (Timestamp) '20100429030000' GROUP BY EpaValue, Location ORDER BY Location, [Leak Count] DESC Dim temp = (From p In db2.RecourceActualEPA_Reports _ Where (p.Timestamp = str1stShiftStart) And (p.Timestamp < str2ndShiftCutoff) _ And (p.EpaName = "Leak1") _ Select p.EpaName.Distinct.Count(), p.Location, p.EpaValue)

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >