Search Results

Search found 1978 results on 80 pages for 'jane story'.

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

  • XML Schema: xs:any processcontent="skip" but still returns error

    - by Jane Doe
    I wanted to embed HTML formatting and so I did <xs:element name="boobie"> <xs:complexType mixed="true"> <xs:sequence> <xs:any namespace="http://www.w3.org/1999/xhtml" minOccurs="0" maxOccurs="unbounded" processContent="skip"/> </xs:sequence> </xs:complexType> </xs:element> However, when I put li tag (dot point element for HTML) inside the XML file (inside boobie tag) it generates error that it is unexpected. What is wrong with this? is the only way to put html tag inside XMl file is to use CDATA?

    Read the article

  • sscanf + c99 not working on some platforms ?

    - by Jane
    When I compile a simple Hello World! program that uses the sscanf function on my local Debian lenny x64, it works. But when I upload the same program to the server running CentOS x86, it will not work. If I do not use sscanf, then the program works on both computers. gcc -std=c99 -O2 -pipe -m32 If I compile it with sscanf but without -std=c99, then it works on both computers. gcc -O2 -pipe -m32 What is the problem with sscanf and c99 on CentOS x86 ? I thought that compiling with the -m32 flag would work on all Linuxes ? (I have limited access to the CentOS server, so I do not have access to error messages.)

    Read the article

  • getnameinfo prototype asks for sockaddr not sockaddr_in ?

    - by Jane
    The getnameinfo prototype asks for sockaddr but I have only seen examples using sockaddr_in. Can this example be re-written for sockaddr ? sin_family becomes sa_family but what about sin_port and sin_addr ? How are they included in sa_data ? struct sockaddr{ unsigned short sa_family; char sa_data[14]; }; struct sockaddr_in{ short sin_family; unsigned short sin_port; struct in_addr sin_addr; char sin_zero[8]; }; struct sockaddr_in sin; memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = inet_addr(IPvar); sin.sin_port = 0; // If 0, port is chosen by system getnameinfo( (struct sockaddr *)&sin, sizeof(sin), buffervar, sizeof(buffervar), NULL, 0, 0);

    Read the article

  • Are fopen/fread/fgets PID-safe in C ?

    - by Jane
    Various users are browsing through a website 100% programmed in C (CGI). Each webpage uses fopen/fgets/fread to read common data (like navigation bars) from files. Would each call to fopen/fgets/fread interefere with each other if various people are browsing the same page ? If so, how can this be solved in C ? (This is a Linux server, compiling is done with gcc and this is for a CGI website programmed in C.) Example: FILE *DATAFILE = fopen(PATH, "r"); if ( DATAFILE != NULL ) { while ( fgets( LINE, BUFFER, DATAFILE ) ) { /* do something */ } }

    Read the article

  • What's wrong with this date behavior in C#?

    - by Jane McDowell
    If I output a formatted date as follows: DateTime.Parse("2010-06-02T15:26:37.789 +01:00").ToString("HH:mm:sszzz") I get the expected result: 15:26:37+01:00 However, if I parse the same date, convert to UTC and output with the same format as follows: DateTime.Parse("2010-06-02T15:26:37.789 +01:00").ToUniversalTime().ToString("HH:mm:sszzz") I get this: 14:26:37+01:00 Now those two dates, the local and UTC versions, should be exactly the same but the outputted text represents two different times. Why is this?

    Read the article

  • php error: unexpected T_OBJECT_OPERATOR.... trying to install magento using ssh commands to dreamhos

    - by Jane
    I am trying to install magento (e-commerce platform) I am following a tutorial that tells me to run this command using ssh: ./pear mage-setup but i'm getting this error: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/domainname.com/downloader/pearlib/php/System.php on line 400 Line 400 is commented in the code snippit from the system.php file: /* Magento fix for set tmp dir in config.ini */ if (class_exists('Maged_Controller',false)) { /*line 400 */ $magedConfig = Maged_Controller::model('Config',true)->load();** if ($magedConfig->get('use_custom_permissions_mode') == '1' && $mode = $magedConfig->get('mkdir_mode')) { $result = System::mkDir(array('-m' . $mode, $tmpdir)); } else { $result = System::mkDir(array('-p', $tmpdir)); } if (!$result) { return false; } } Can anyone help my demystify this error?

    Read the article

  • Does the iPhone compress images saved within my app's documents directory?

    - by Jane Sales
    We are caching images downloaded from our server. We write them to our local storage like this: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0] ; NSString* folder = [[documentsDirectory stringByAppendingPathComponent:@"flook.images"] retain]; NSString* fileName = [folder stringByAppendingFormat:@"/%@", aBaseFilename]; BOOL writeSuccess = [anImageData writeToFile:fileName atomically:NO]; The downloaded images are always the expected size, around 45-85KB. Later, we read images from our cache like this: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0] ; NSString* folder = [[documentsDirectory stringByAppendingPathComponent:@"flook.images"] retain]; NSString* fileName = [folder stringByAppendingFormat:@"/%@", aBaseFilename]; image = [UIImage imageWithContentsOfFile:fileName]; Occasionally, the images returned from this cache read are much smaller because they are much more compressed - around 5-10KB. Has the OS done this to us?

    Read the article

  • How to remove one instance of one string in PHP?

    - by Jane
    I have a open source editor on the cms that I am making that automatically inserts a <br /> tag at the beginning of the post it submits to the database. This makes validation a pain, since even though there is no real text being submitted, the form still accepts the break tag as input and prevents the "Please enter some text" error from showing. So I tried to remove the opening break tag by filtering my input like this: substr($_POST['content'], 6); This works as long as the user doesn't press the backspace a couple of times which removes the break tag in which case the first 8 characters of the post gets removed even if they are not a break tag. So how can I remove the first 6 characters of the input ONLY if those first 6 characters are composed of the break tag. Also I don't want to remove all break tags, only the one at the very beginning of the post.

    Read the article

  • Dynamic status bar image creation in php

    - by jane
    I am new to image creation in php. Have a look here http://s.kapipal.com/image_progress?v=.46 If you change the param value, bar progress should also be changed to passed value How can i implement something like above? Thanks for the help inadvance

    Read the article

  • How can i encrypt a function or its contents in a php class?

    - by jane
    How can i encrypt a function or its contents in a php class ? e.g. Take a look at below class, i would like to encrypt the function test1() so the code inside will never be revealed but executes as normal class test { var $x; var $y; function test1() { return $this->x; } function test2() { return $this->y; } } Thanks in advance

    Read the article

  • Getting data from JFrame AFTER the form is filled

    - by mary jane
    I'm trying to get data for my application from a form set in an external window (getDataWindow extends javax.swing.JFrame). The problem is that functions are executed before form is filled in. getDataWindow dataW=new getDataWindow(); dataW.setVisible(true); size=dataW.returnSize(); I've tried also adding additional boolean variable to getDataWindow getDataWindow dataW=new getDataWindow(); dataW.setVisible(true); while(!dataW.checkIfReady()){wait();} size=dataW.returnSize(); But it makes also the window wait (it appears but it's black inside and nothing happens). I think i should create some threads for that - I've tried to call a window making function getDataWindow in java.awt.EventQueue.invokeLater(new Runnable()) but I had to initialize dataW earlier so dataW.checkIfReady() could be called, so it is a catch 22.

    Read the article

  • PartCover and TeamCity

    - by jane doe
    I am using TeamCity to build via a solution file. I am attempting to get "PartCover" to work it. It is easy enough to point it to the partcover.exe, I am just unsure how to get team city to produce a proper report from the results of our nUnit test. I have added the a coverage.zip file to our setup and it is displaying the correct info under the artefacts tab, however under the code coverage tab the only info displayed is "Coverage by assembly" and nothing else. Any help or ideas would be great.

    Read the article

  • What database options do I have for the Blackberry?

    - by peeping-jane
    I notice most of the discussions about Blackberry database options are old, and generally not too informative. As of today, March 31st, 2010, what is the best, most universally supported, free database option available for Blackberry developers? I heard SQLite is available for JDE v5, but last I checked, that was still in beta, and I didn't want to commit to developing on a system that is not supported by most of the phones in service. Thing is, I don't see any dates on these claims. For all I know, the announcements I am reading are from 2008. So, I am still on v 4.7. I need to use a relational DB for the app I am developing, but there aren't many resources for DB handling available - or at least resources that are useful to me. I find a lot of "tutorials" that assume you know everything there is to know about Blackberry development, or Java. But no complete classes or anything. Many of these examples don't even work. Eclipse gives warnings and errors from code copied and pasted from other people's examples. I can answer any questions that may assist in this case. Hopefully, this thread will help many BB developers in the future.

    Read the article

  • Microsoft Access - Enter Parameter Value why?

    - by Jane Doe
    I am encountering a problem for my database. Here is the relationships of the database And tried to do the query for how many transactions have movie "Harry_Potter"? so I used SQL query: SELECT COUNT(td.movie) AS number_of_occurrence, td.transaction_number FROM TransactionDetails td, MovieDetails md WHERE md.movie = Harry_Potter But it asks for Harry_Potter enter parameter value why? The relevant SQL statements are CREATE TABLE TransactionDetails ( transaction_number INTEGER PRIMARY KEY, movie VARCHAR(30) NOT NULL, date_of_transaction DATE NOT NULL, member_number INTEGER NOT NULL ) CREATE TABLE MovieDetails ( movie VARCHAR(30) PRIMARY KEY, movie_type VARCHAR(3) NOT NULL, movie_genre VARCHAR(10) NOT NULL ) ALTER TABLE TransactionDetails ADD CONSTRAINT member_number_fk FOREIGN KEY (member_number) REFERENCES LimelightMemberDetails(member_number); ALTER TABLE TransactionDetails ADD CONSTRAINT transaction_number_drink_fk FOREIGN KEY (transaction_number) REFERENCES DrinkTransactionDetails(transaction_number); ALTER TABLE TransactionDetails ADD CONSTRAINT transaction_number_food_fk FOREIGN KEY (transaction_number) REFERENCES FoodTransactionDetails(transaction_number); ALTER TABLE TransactionDetails ADD CONSTRAINT movie_fk FOREIGN KEY (movie) REFERENCES MovieDetails (movie); Thank you for your help! If there is anything wrong with my database design please let me know! thank you!

    Read the article

  • How to reference a particular JSON in a function call.

    - by Jane Wilkie
    Hi guys! I have two javascript routines.. the first one declares some JSON and it contains a function that takes two arguments, the first argument being the json object that needs traversing and the second argument is the tab that the rendering is done in. The second routine merely passes the name of the JSON that needs traversing and tab to render in. The code is below.... <script language="JavaScript1.2" type="text/javascript"> var arr = [ {"id":"10", "class":"child-of-9", "useless":"donotneed"}, {"id":"11", "class":"child-of-10", "useless":"donotneed"}]; var arrtwo = [ {"id":"12", "class":"child-of-12", "useless":"donotneed"}, {"id":"13", "class":"child-of-13", "useless":"donotneed"}]; function render_help(json,tab){ var html=''; for(var i=0;i<json.length;i++){ var obj = json[i]; for(var key in obj){ var attrName = key; var attrValue = obj[key]; if (attrName == "id"){ html = html +'<B>'+attrValue+'</B>'+'<BR><BR>'; }else if (attrName == "class"){ html = html + attrValue + '<BR><BR>'; } } } document.getElementById(tab).innerHTML=(html); } </script> <script language="JavaScript1.2" type="text/javascript"> render_help(arr,"helptab"); </script> Various testing and strategically placed alert boxes indicate that the tab parameter is being passed and interpreted correctly. I know this because when I change .... document.getElementById(tab).innerHTML=(html); to document.getElementById(tab).innerHTML=("Howdy"); and it renders "Howdy" just fine. Putting an alert box (alert(json)) in to check the value of json yields.... [object.Object],[object.Object] The JSON object remains elusive. For the purposes of this scripting I need the JSON "arr" to be iterated over. I feel like the answer is fairly obvious so far no luck. Admittedly I am new with Javascript and I am apparently missing something. Does anyone have a clue as to what I'm overlooking here? Happy New Year to you all! Janie

    Read the article

  • StreamWriter does throw exception underlying connection is broken?

    - by Jane
    I am using StreamWriter instantiated over a Tcpstream like this streamWriter = new StreamWriter(tcpClient.GetStream()); I am confused about the behaviour of following calls with regards to Exceptions. The following two functions are expected to raise IOException , Surprisingly they do not raise the IOException when the server is to which the tcpClient is connected is disconnected and therefore the underlying TCP client connection is broken.. These two lines execute without raising any Exception. Why ? streamWriter.WriteLine(strBuffer); streamWriter.Flush();

    Read the article

  • Install mySQL data using ftp?

    - by Jane
    I am trying to install magento (open source e-commerce platform) sample data on my webhost. I have uploaded the file magento_sample_data.sql via ftp, and setup a new database and have assigned it to a user. How do I get the sample data into my empty database?

    Read the article

  • Table header is not shown

    - by Vivien
    My error is that the table headers of my two tables are not shown. Right now I am setting the header with new JTable(data, columnNames). Here is an example which shows, my problem: public class Test extends JFrame { private static final long serialVersionUID = -4682396888922360841L; private JMenuBar menuBar; private JMenu mAbout; private JMenu mMain; private JTabbedPane tabbedPane; public SettingsTab settings = new SettingsTab(); private void addMenuBar() { menuBar = new JMenuBar(); mMain = new JMenu("Main"); mAbout = new JMenu("About"); menuBar.add(mMain); menuBar.add(mAbout); setJMenuBar(menuBar); } public void createTabBar() { tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.addTab("Settings", settings.createLayout()); add(tabbedPane); tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); } private void makeLayout() { setTitle("Test"); setLayout(new BorderLayout()); setPreferredSize(new Dimension(1000, 500)); addMenuBar(); createTabBar(); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); pack(); setVisible(true); } public void start() { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { makeLayout(); } }); } public static void main(String[] args) { Test gui = new Test(); gui.start(); } public class SettingsTab extends JPanel { public JScrollPane createLayout() { JPanel panel = new JPanel(new MigLayout("")); JScrollPane sp = new JScrollPane(panel); sp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); panel.add(table1(), "growx, wrap"); panel.add(Box.createRigidArea(new Dimension(0,10))); panel.add(table2()); // panel.add(Box.createRigidArea(new Dimension(0,10))); return sp; } public JPanel table1() { JPanel panel1 = new JPanel(); String[] columnNames = {"First Name", "Last Name"}; Object[][] data = { {"Kathy", "Smith"}, {"John", "Doe"}, {"Sue", "Black"}, {"Jane", "White"}, {"Joe", "Brown"}, {"John", "Doe"}, {"Sue", "Black"}, {"Jane", "White"}, {"Joe", "Brown"} }; final JTable table = new JTable(data, columnNames); tableProperties(table); panel1.add(table); panel1.setLayout(new BoxLayout(panel1, BoxLayout.Y_AXIS)); return panel1; } public JPanel table2() { JPanel panel1 = new JPanel(); String[] columnNames = {"First Name", "Last Name"}; Object[][] data = { {"Kathy", "Smith"}, {"John", "Doe"}, {"Sue", "Black"}, {"Jane", "White"}, {"Joe", "Brown"}, {"John", "Doe"}, {"Sue", "Black"}, {"Jane", "White"}, {"Joe", "Brown"} }; final JTable table = new JTable(data, columnNames); table.setPreferredScrollableViewportSize(new Dimension(500, 70)); table.setFillsViewportHeight(true); tableProperties(table); panel1.add(table); panel1.setLayout(new BoxLayout(panel1, BoxLayout.Y_AXIS)); return panel1; } public void tableProperties(JTable table) { table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); table.repaint(); table.revalidate(); } } } Any recommendations what I am doing wrong?

    Read the article

  • Code Trivia #4

    - by João Angelo
    Got the inspiration for this one in a recent stackoverflow question. What should the following code output and why? class Program { class Author { public string FirstName { get; set; } public string LastName { get; set; } public override string ToString() { return LastName + ", " + FirstName; } } static void Main() { Author[] authors = new[] { new Author { FirstName = "John", LastName = "Doe" }, new Author { FirstName = "Jane", LastName="Doe" } }; var line1 = String.Format("Authors: {0} and {1}", authors); Console.WriteLine(line1); string[] serial = new string[] { "AG27H", "6GHW9" }; var line2 = String.Format("Serial: {0}-{1}", serial); Console.WriteLine(line2); int[] version = new int[] { 1, 0 }; var line3 = String.Format("Version: {0}.{1}", version); Console.WriteLine(line3); } } Update: The code will print the first two lines // Authors: Doe, John and Doe, Jane // Serial: AG27H-6GHW9 and then throw an exception on the third call to String.Format because array covariance is not supported in value types. Given this the third call of String.Format will not resolve to String.Format(string, params object[]), like the previous two, but to String.Format(string, object) which fails to provide the second argument for the specified format and will then cause the exception.

    Read the article

  • The Best Websites for Downloading and Playing Classic and New Text Adventure Games

    - by Lori Kaufman
    Before computers could handle graphical games, there were text adventure games. The games are interactive stories, so playing a text adventure game is like being part of a book in which you affect the story. Text adventure games are also referred to as “interactive fiction.” Interactive Fiction (IF) is actually a more accurate term for text adventure games, because these games can cover any topics, such as romances or comedies, not just adventures. They can also simulate real life. Even though computers can now handle intensely graphical games, playing text adventure games can still be fun. It’s like reading a good book and getting lost in the universe of the story, except you become the hero or heroine and affect the ending of the story. We’ve collected some links to websites where you can download classic and new text adventure games or play them online. There are also some free tools available for creating your own text adventure games. We even found a documentary about the evolution of computer adventure games and some articles about the art and craft of developing the original text adventure games. How To Create a Customized Windows 7 Installation Disc With Integrated Updates How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using?

    Read the article

  • Where is a good place to start to learn about custom caching in .Net

    - by John
    I'm looking to make some performance enhancements to our site, but I'm not sure exactly where to begin. We have some custom object caching, but I think that we can do better. Our Business We aggregate news stories on a news type of web site. We get approximately 500-1000 new stories per week. We have index pages that show various lists of the items and details pages that show the individual stories. Our Current Use case: Getting an Individual Story User makes a request The Data Access Layer(DAL) checks to see if the item is in cache and if item is fresh (15 minutes). If the item is not in cache or is not fresh, retrieve the item from SQL Server, save to cache and return to user. Problems with this approach The pull nature of caching means that users have to pay the waiting cost every time that the cache is refreshed. Once a story is published, it changes infrequently and I think that we should replace the pull model with something better. My initial thoughts My initial thought is that stories should ALL be stored locally in some type of dictionary. (Cache or is there another, better way?). If the story is not found, then make a trip to the database, update the local dictionary and send the item back. Since there may be occasional updates to stories, this should be an entirely process from the user. I watched a video by Brent Ozar, How StackOverflow Scales SQL Server, in which Brent states "the fastest database query is the one that you don't make". Where do I start? At this point, I don't know exactly what the solution is. Is it caching? Is there a better way of using local storage? Do I use a Dictionary, OrderedDictionary, List ? It seems daunting and I'm just looking for some good starting points to learn more about how to do this type of optimization.

    Read the article

  • Putting Together a Game Design Team?

    - by Kaia
    I'm attempting to put together a game design team that is willing to help me design/program, test, and somewhat produce the game we make to the public. I need anyone who knows anything about programming/coding, designing, etc. Once we get it up and running and out into the world (over dramatic maybe? haha) I have ideas of generating a profit from it so there is a possibility of payment. My thinking on it (so far) is this: 2D (possibly. I haven't decided if I want it 2D or 3D. It really depends on what is easier) 3rd person. Adventure (I want there to be a point to it, but like a point with no real end) I want there to be a story to it. If you've ever played Dofus, think like that. There is a story to the game, but no real end. I want (if possible) to include mini-games. These could end up becoming a possible way for a player to aquire in-game money, quest items, etc. If anyone is interested in helping me create the story line/script (which we will finsih first, before creating the game) please contact me. I want to get this completed as soon as possible.

    Read the article

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