Daily Archives

Articles indexed Monday May 17 2010

Page 28/112 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • Python string formatting when string contains "%s" without escaping

    - by Stephen Gornick
    When formatting a string, my string may contain a modulo "%" that I do not wish to have converted. I can escape the string and change each "%" to "%%" as a workaround. e.g., 'Day old bread, 50%% sale %s' % 'today!' output: 'Day old bread, 50% sale today' But are there any alternatives to escaping? I was hoping that using a dict would make it so Python would ignore any non-keyword conversions. e.g., 'Day old bread, 50% sale %(when)s' % {'when': 'today'} but Python still sees the first modulo % and gives a: TypeError: not enough arguments for format string

    Read the article

  • Cakephp 1.3 database migration with

    - by Vijay Kumbhar
    Hello All, I am using cakephp 1.3 on LAMP (ubuntu 9.04) platform. Trying the database migration with cakephp inbuilt schema generation script. I am inside the app folder & When i fire a command in the terminal 'cake schema run create schema file name', It is giving me the error that "Error:schema.php could not be included." Can anybody help me out?

    Read the article

  • Call External Javascript function using Codeigniter

    - by Ajith
    Hi, I need to call a javascript function from my controller in codeigniter.It is possible in codeigniter ? Problem Details My javascript file contains ` function debugOutput(msg) { alert (msg); } ` and also I need to call it from my controller. I done it as follows. <?php function check() { header('Content-type: application/x-javascript'); // body here } ?> function execute() { debugOutput("&lt;?php echo 'test'; ?&gt;"); } execute(); But it is not working.Please help me to solve it.

    Read the article

  • SplitView Controller portrait mode- Top button keeps shifting to right.

    - by nishantcm
    Hi, I am using SplitViewController in ipad. On a button click from detail view, I open a modalview which is in full screen mode. Whenever I dismiss the modal view, the button which displays the table view in portrait mode shifts to the right. If I continue the process of opening the modal view and dismissing it, it keeps moving to the right until it disappears to the right of the screen. Any idea why this is happening?

    Read the article

  • Is there any restriction in generating the maximum number of keys for google maps

    - by Aruna
    Hi , I have generated a Google map key by login as a [email protected] . Is there any restriction in generating the number of keys for each user. Since we have 2 different domains and i need to generate key for that too. Actually i am not sure about of how many keys the person who used this id has created.. And is there any way to find of how many keys had already been created for the same account previously???

    Read the article

  • Which SQL database should I run?

    - by Chris Salij
    I'm creating my first website from hand-coded scratch (just used WordPress and Drupal before) and I'm at the point where I'm setting up my database for the site. However my host has given me 4 options to choose from in the database department. MS SQL Server 2005 MySQL PostgreSQL MySQL 5 Which should I go for? From what I understand PostgreSQL is meant for smaller databases with high access times. Though to be honost I'm not quite sure.

    Read the article

  • svnsync loses revision properties although hook installed

    - by roesslerj
    Hello all! I have a pretty weird problem. We have setup an SVN-Mirror via cronjob (because it needs to go from inside to outside of a firewall, so no post-commit-hook possible) and svnsync. We installed a pre-revprop-hook just as told. Everything seems to work fine, except that it doesn't. E.g. when manually executing the script. # svnsync --non-interactive sync file://<path-to-mirror> --source-username <usr> --source-password <pwd> Committed revision 19817. Copied properties for revision 19817. No error, no complaints. But if checking for the revision properties it says: # svnlook info <path-to-mirror> 0 # svn info -r HEAD file://<path-to-mirror> 2>&1 Path: <root-of-mirror> URL: file://<path-to-mirror> Repository Root: file://<path-to-mirror> Repository UUID: <uid> Revision: 19817 Node Kind: directory Last Changed Rev: 19817 So somehow the author and timestamp information gets lost. But we need that information for our internal processes. Since no error or warning is produced I have absolutely no idea even where to start to look. Everything is local (except for the remote master), so there are no server-logs to look at. I also tried to manually recopy via svnsync copy-revprops (http://chestofbooks.com/computers/revision-control/subversion-svn/svnsync-Copy-revprops-Ref-svnsync-C-Copy-revprops.html). It says Copied properties for revision 19885. But when I query them, it's just the same. Any ideas how I could approach that problem, or even better -- how to solve it? Any ideas appreciated.

    Read the article

  • How to make samba users

    - by Master
    I want to make users in samba but not in the system. how can i make them. i have only one system user called userA and i want to make 3 different users can access samba shared folders

    Read the article

  • Prevent scp from copying local files?

    - by ashcatch
    I just read the Linux scp command issue question and it reminded me that I regularily forget to specify the colon in the host part of a scp command, and thus copying a file locally instead of copying to a remote host, e.g. I do scp foo host instead of scp foo host: But I never use scp to copy a file locally. So I wonder if there is a way to make scp fail if both (the source and destination) arguments refer to local files.

    Read the article

  • Fusion Middleware 11gR1 : 4??????

    - by Hiroyuki Yoshino
    ??(2010?4?)??????????????Fusion Middleware 11gR1??????????????? ????????????????? Mainframe and TP-Monitoring Adapters for SOA 11g / CDC Adapters for SOA 11g ???????????????????????? Adapters for CICSAdapters for VSAMAdapters for IMS/TMAdapters for IMS/DBAdapters for TuxedoCDC Adapters for ADABASCDC Adapters for DB2CDC Adapters for IMS/DBCDC Adapters for SQL ServerCDC Adapters for VSAM ?????????????????????????(??)????????????????(??????????????????)????????·????????Adapter Certification??????????????

    Read the article

  • Can a PL/pgSQL function contain a dynamic subquery?

    - by morpheous
    I am writing a PL/pgSQL function. The function has input parameters which specify (indirectly), which tables to read filtering information from. The function embeds business logic which allows it to select data from different tables based on the input arguments. The function dynamically builds a subquery which returns filtering data which is then used to run the main query. My questions are: Is it 'legal' to use a dynamic subquery in a PL/pgSQL function. I cant see why not - but this question is related to the next one. AFAIK, PL/pgSQL are cached or precompiled by the query engine. How does having a function that generates dynamic subqueries impact the work of the query engine?

    Read the article

  • Why does System.Windows.MessageBoxImage have enumeration sub-items with the same value?

    - by devdigital
    Hi, I'm trying to write my own abstraction over the MessageBoxImage enumeration, and see that MessageBoxImage is defined as: namespace System.Windows { public enum MessageBoxImage { None = 0, Error = 16, Hand = 16, Stop = 16, Question = 32, Exclamation = 48, Warning = 48, Asterisk = 64, Information = 64, } } How does the Show method determine whether to display an Error image or a Hand image? How would I write a method which takes a MessageBoxImage type, and return a CustomMessageBoxImage type which maps to the MessageBoxImage type, as I can't include both MessageBoxImage.Error and MessageBoxImage.Hand in the same switch statement?

    Read the article

  • Problem in Rich : menubar

    - by Ramesh G
    Hi, I'm using rich:toolbar with backing bean menuAction method.I'm facing one problem in menu link icons.Suppose if i ve child menu in my parent menu it is displaying "hand symbol" for that.else if i dont ve any child menu in my parent menu it is showing "I" this icon.While clicking parent menu(without having child menu) i want hand symbol icon instead of "I" this icon. please help me....... Regards, Ramesh G

    Read the article

  • C++ smart pointer for non-object type?

    - by Brian
    Hi, I'm trying to use smart pointers such as auto_ptr, shared_ptr. However, I don't know how to use it in this situation. CvMemStorage *storage = cvCreateMemStorage(); ... use the pointer ... cvReleaseMemStorage(&storage); I'm not sure, but I think that the storage variable is just malloc'ed memory, not object. Is there a way to use the smart pointers for the storage variable? Thank you.

    Read the article

  • MVC routing - why does my request not match the route?

    - by Anders Juul
    Hi all, I'm making a request that I thought would be caught by my route, but there is no match. What am I doing wrong? Any comments appreciated, Anders, Denmark -- Url : EventReponse/ComingAdmin/386/01e71c45-cb67-4711-a51f-df5fcb54bb8b Expected match: routes.MapRoute( "Editing event responses for other user", // Route name "EventResponse/{action}/{eventId}/userId", // URL with parameters new {controller = "EventResponse", action = "ComingAdmin"} // Parameter defaults ); Desired controller (but I guess this does not come into play): public class EventResponseController : ControllerBase { (...) public ActionResult ComingAdmin(int eventId, Guid userId) { return RegisterEventResponse(eventId, AttendanceStatus.Coming, userId); } }

    Read the article

  • How do I delete a signature from an Excel document using Office automation

    - by Guy Marom
    Hello, I have a signed Excel workbook and I want to delete the signature from it. The problem is that when I try to delete the signature there's a prompt for confirming the deletion and I want the process to be fully automatic. Here's a code sample, the prompt appears when the last line executes: Dim source As String = "c:\temp\signed.xlsx" Dim app As New Application() app.Visible = True Dim book As Workbook = app.Workbooks.Open(source, UpdateLinks:=0) app.ShowToolTips = False Dim sig As Microsoft.Office.Core.Signature = book.Signatures.Item(1) sig.Delete() Thanks

    Read the article

  • Hi i have a c programming doubt in the implementation of hash table?

    - by aks
    Hi i have a c programming doubt in the implementation of hash table? I have implemented the hash table for storing some strings? I am having problem while dealing with hash collisons. I am following chaining link-list approach to overcome the same? But, somehow my code is behaving differently. I am not able to debug the same? Can somebody help? This is what i am facing: Say first time, i insert a string called gaur. My hash map calculates the index as 0 and inserts the string successfully. However, when another string whose hash map also when calculates turns out to be 0, my previous value gets overrridden i.e. gaur will be replaced by new string. This is my code: struct list { char *string; struct list *next; }; struct hash_table { int size; /* the size of the table */ struct list **table; /* the table elements */ }; struct hash_table *create_hash_table(int size) { struct hash_table *new_table; int i; if (size<1) return NULL; /* invalid size for table */ /* Attempt to allocate memory for the table structure */ if ((new_table = malloc(sizeof(struct hash_table))) == NULL) { return NULL; } /* Attempt to allocate memory for the table itself */ if ((new_table->table = malloc(sizeof(struct list *) * size)) == NULL) { return NULL; } /* Initialize the elements of the table */ for(i=0; i<size; i++) new_table->table[i] = '\0'; /* Set the table's size */ new_table->size = size; return new_table; } unsigned int hash(struct hash_table *hashtable, char *str) { unsigned int hashval = 0; int i = 0; for(; *str != '\0'; str++) { hashval += str[i]; i++; } return (hashval % hashtable->size); } struct list *lookup_string(struct hash_table *hashtable, char *str) { printf("\n enters in lookup_string \n"); struct list * new_list; unsigned int hashval = hash(hashtable, str); /* Go to the correct list based on the hash value and see if str is * in the list. If it is, return return a pointer to the list element. * If it isn't, the item isn't in the table, so return NULL. */ for(new_list = hashtable->table[hashval]; new_list != NULL;new_list = new_list->next) { if (strcmp(str, new_list->string) == 0) return new_list; } printf("\n returns NULL in lookup_string \n"); return NULL; } int add_string(struct hash_table *hashtable, char *str) { printf("\n enters in add_string \n"); struct list *new_list; struct list *current_list; unsigned int hashval = hash(hashtable, str); printf("\n hashval = %d", hashval); /* Attempt to allocate memory for list */ if ((new_list = malloc(sizeof(struct list))) == NULL) { printf("\n enters here \n"); return 1; } /* Does item already exist? */ current_list = lookup_string(hashtable, str); if (current_list == NULL) { printf("\n DEBUG Purpose \n"); printf("\n NULL \n"); } /* item already exists, don't insert it again. */ if (current_list != NULL) { printf("\n Item already present...\n"); return 2; } /* Insert into list */ printf("\n Inserting...\n"); new_list->string = strdup(str); new_list->next = NULL; //new_list->next = hashtable->table[hashval]; if(hashtable->table[hashval] == NULL) { hashtable->table[hashval] = new_list; } else { struct list * temp_list = hashtable->table[hashval]; while(temp_list->next!=NULL) temp_list = temp_list->next; temp_list->next = new_list; hashtable->table[hashval] = new_list; } return 0; }

    Read the article

  • Outlook Macro not executing

    - by Tim
    Hello all, we are using an an outlook macro for incoming emails to unzip the attachments, log them in sql server and copy them to a special working folder where a windows service processes them. The problems are: the user must be logged in at the server otherwise the macro wont run. I think there is no workaround for this. whenever a modal dialog pops up in outlook and waits for user input, the macro wont execute either (f.e. AutoArchive) I have stopped AutoArchiving all x-days in the options. Because its a productive environment, are there other possible windows preventing the macro to execute, which i must disable now? Our outlook-macro solution surely is not the best because of above problems. Are there better alternatives to read emails, unzip attachments and move them to a working folder? My language is VB.Net and server OS is windows 2008. Regards, Tim

    Read the article

  • How do I secure all the admin actions in all controllers in cakePHP

    - by Gaurav Sharma
    Hello Everyone, I am developing an application using cakePHP v 1.3 on windows (XAMPP). Most of the controllers are baked with the admin routing enabled. I want to secure the admin actions of every controller with a login page. How can I do this without repeating much ? One solution to the problem is that "I check for login information in the admin_index action of every controller" and then show the login screen accordingly. Is there any better way of doing this ? The detault URL to admin (http://localhost/app/admin) is pointing to the index_admin action of users controller (created a new route for this in routes.php file) Thanks

    Read the article

  • NHibernate Criteria question

    - by Jeneatte Jolie
    I have a person object, which can have unlimited number of first names. So the first names are another object. ie person --- name             --- name             --- name What I want to do is write an nhiberate query using which will get me a person who has certain names. so one query might be find someone whose names are alison and jane and philippa, then next query may be one to find someone whose names are alison and jane. I only want to return people who have all the names I'm search on. So far I've got ICriteria criteria = session.CreateCriteria(typeof (Person)); criteria.CreateAlias("Names", "name"); ICriterion expression = null; foreach (string name in namesToFind) { if (expression == null) { expression = Expression.Like("name.Value", "%" + name + "%"); } else { expression = Expression.Or( expression, Expression.Like("name.Value", "%" + name + "%")); } } if (expression != null) criteria.Add(expression); But this is returning every person with ANY of the names I'm searching on, not ALL the names. Can anyone help me out with this? Thanks!

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >