Search Results

Search found 234 results on 10 pages for 'allan deamon'.

Page 7/10 | < Previous Page | 3 4 5 6 7 8 9 10  | Next Page >

  • print customized result in prolog

    - by Allan Jiang
    I am working on a simple prolog program. Here is my problem. Say I already have a fact fruit(apple). I want the program take a input like this ?- input([what,is,apple]). and output apple is a fruit and for input like ?-input([is,apple,a,fruit]) instead of default print true or false, I want the program print some better phrase like yes and no Can someone help me with this? My code part is below: input(Text) :- phrase(sentence(S), Text), perform(S). %... sentence(query(Q)) --> query(Q). query(Query) --> ['is', Thing, 'a', Category], { Query =.. [Category, Thing]}. % here it will print true/false, is there a way in prolog to have it print yes/no, %like in other language: if(q){write("yes")}else{write("no")} perform(query(Q)) :- Q.

    Read the article

  • Set "Start With" value for Oracle sequence dynamically

    - by Allan
    I'm trying to create a release script that can be deployed on multiple databases, but where the data can be merged back together at a later date. The obvious way to handle this is to set the sequence numbers for production data sufficiently high in subsequent deployments to prevent collisions. The problem is in coming up with a release script that will accept the environment number and set the "Start With" value of the sequences appropriately. Ideally, I'd like to use something like this: ACCEPT EnvironNum PROMPT 'Enter the Environment Number: ' --[more scripting] CREATE SEQUENCE seq1 START WITH &EnvironNum*100000; --[more scripting] This doesn't work because you can't evaluate a numeric expression in DDL. Another option is to create the sequences using dynamic SQL via PL/SQL. ACCEPT EnvironNum PROMPT 'Enter the Environment Number: ' --[more scripting] EXEC execute immediate 'CREATE SEQUENCE seq1 START WITH ' || &EnvironNum*100000; --[more scripting] However, I'd prefer to avoid this solution as I generally try to avoid issuing DDL in PL/SQL. Finally, the third option I've come up with is simply to accept the Start With value as a substitution variable, instead of the environment number. Does anyone have a better thought on how to go about this?

    Read the article

  • Serializing ActiveRecord objects without storing their attributes?

    - by Allan Grant
    I'm working on a problem where I need to store serialized hierarchies of Ruby objects in the database. Many of the objects that will need to be saved are ActiveRecord objects with a lot of attributes. Instead of saving the entire objects and then refreshing their attributes from the DB when I load them (in case they changed, which is likely), it would be easier to just store the references (class and database id) for these objects. Does anyone know if there's already a way to do this in Rails, or if there's an existing gem for it? Wanted to check if something existed before spending a ton of time hacking on it.

    Read the article

  • How to style a label with a colon

    - by Allan
    I have a details view window in WPF and a label may look like this. <Label Content="{x:Static properties:Resources.Reference}" /> So that is obtains it content from my property Resource. How can transform/format the content so it has a colon after each label item. e.g. instead of the content simply displaying Reference I want it to transform to Reference:

    Read the article

  • Android: I uploaded my first app! Keywords?...

    - by Allan
    I've just uploaded my first app on the market. It all went and looks well. I tried a few keywords to search for it, words that I also have in my description AND promo text, but some words don't find my app, some do. How does the keyword strategy work for an app on the market, I couldn't find no documentation on it.

    Read the article

  • Updating target workbook - extracting data from source workbook

    - by Allan
    My question is as follows: I have given a workbook to multiple people. They have this workbook in a folder of their choice. The workbook name is the same for all people, but folder locations vary. Let's assume the common file name is MyData-1.xls. Now I have updated the workbook and want to give it to these people. However when they receive the new one (let's call it MyData-2.xls) I want specific parts of their data pulled from their file (MyData-1) and automatically put into the new one provided (MyData-2). The columns and cells to be copied/imported are identical for both workbooks. Let's assume I want to import cell data (values only) from MyData-1.xls, Sheet 1, cells B8 through C25 ... to ... the same location in the MyData-2.xls workbook. How can I specify in code (possibly attached to a macro driven import data now button) that I want this data brought into this new workbook. I have tried it at my own location by opening the two workbooks and using the copy/paste-special with links process. It works really well, but It seems to create a hard link between the two physical workbooks. I changed the name of the source workbook and it still worked. This makes me believe that there is a "hard link" between the tow and that this will not allow me to give the target (MyData-2.xls) workbook to others and have it find their source workbook.

    Read the article

  • Order by Domain Extension Name using CodeIgniter Active Record Class

    - by allan
    $extension = “SUBSTRING_INDEX(domain_name, ‘.’, -1)”; $this->db->order_by($extension, “asc”); It says: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘asc LIMIT 50’ at line 44 But its working when I didn’t used the $this-db-order_by Active Record Class such as this one: $this-db-query(“SELECT * FROM domain ORDER BY SUBSTRING_INDEX(domain_name, ‘.’, -1)”); Anyone please help me. Thanks.

    Read the article

  • Stacked up with web service configuration

    - by Allan Chua
    I'm currently stacked with the web service that im creating right now. when Testing it in local it all works fine but when I try to deploy it to the web server it throws me the following error An error occurred while trying to make a request to URI '...my web service URI here....'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. here is my web config. <?xml version="1.0"?> <configuration> <configSections> </configSections> <system.webServer> <modules runAllManagedModulesForAllRequests="true"> </modules> <validation validateIntegratedModeConfiguration="false" /> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2000000000" /> </requestFiltering> </security> </system.webServer> <connectionStrings> <add name="........" providerName="System.Data.SqlClient" /> </connectionStrings> <appSettings> <!-- Testing --> <add key="DataConnectionString" value="..........." /> </appSettings> <system.web> <compilation debug="true" targetFramework="4.0"> <buildProviders> <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </buildProviders> </compilation> <httpRuntime executionTimeout="1200" maxRequestLength="2000000" /> </system.web> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> <behaviors> <serviceBehaviors> <behavior name="Service1"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> <dataContractSerializer maxItemsInObjectGraph="2000000000" /> </behavior> <behavior name=""> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> <behavior name="nextSPOTServiceBehavior"> <serviceMetadata httpsGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true" /> <dataContractSerializer maxItemsInObjectGraph="2000000000" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="SecureBasic" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="Transport" /> <readerQuotas maxArrayLength="2000000" maxStringContentLength="2000000"/> </binding> <binding name="BasicHttpBinding_IDownloadManagerService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="Transport" /> </binding> </basicHttpBinding> </bindings> <services> <service behaviorConfiguration="nextSPOTServiceBehavior" name="NextSPOTDownloadManagerWebServiceTester.Web.WebServices.DownloadManagerService"> <endpoint binding="basicHttpBinding" bindingConfiguration="SecureBasic" name="basicHttpSecure" contract="NextSPOTDownloadManagerWebServiceTester.Web.WebServices.IDownloadManagerService" /> <!--<endpoint binding="basicHttpBinding" bindingConfiguration="" name="basicHttp" contract="NextSPOTDownloadManagerWebServiceTester.Web.WebServices.IDownloadManagerService" />--> <!--<endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDownloadManagerService" contract="NextSPOTDownloadManagerWebServiceTester.Web.WebServices.IDownloadManagerService" /> <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />--> </service> </services > </system.serviceModel> </configuration>

    Read the article

  • c++ template: 'is not derived from type'

    - by Allan
    I do not understand why this code is not valid: #include <vector> template <typename T> class A{ public: A() { v.clear(); } std::vector<A<T> *>::const_iterator begin(){ return v.begin(); } private: std::vector<A<T> *> v; }; When compiling it with gcc, it get the following error: test.cpp:8: error: type 'std::vector<A<T>*, std::allocator<A<T>*> >' is not derived from type 'A<T>' test.cpp:8: error: expected ';' before 'begin' test.cpp:12: error: expected `;' before 'private' What is wrong, and how to fix it??

    Read the article

  • Wordpress homepage with latest posts and Advanced Custom fields - How?

    - by Allan Crabtree
    I'd like my homepage to display my latest posts which are portfolio projects of mine. Beneath these project thumbnails I've got my static content which I'm using the Repeater add-on from Advanced Custom Fields to grab. I cant get it all to work on the same page... either get the blog to work or the ACF stuff to work. Never both because one needs to be a designated static page and one needs to be a posts page. I don't understand how to tie it together and make it appear as one page. I've experimented with the settings in the reading panel.. I've tried using front-page.php I've read up on the WP hierarchy etc I've tried using templates... I've tried wp_reset_postdata(); which I read about elsewhere on Stack Overflow. What settings must I use in the reading panel. Do I need to use a template file? Here's the code I'm working with, I've split the code between templates and different files already, but just for ease of reading its all together here (maybe that's the right way to do it anyway, I wouldn't know..) <!-- The posts/portfolio items --> <?php get_header(); ?> <div> <?php if(have_posts()) : ?> <ul> <?php while ( have_posts() ) : the_post(); ?> <li> <!-- Permalink,title and post thumbnail here (omitted) --> </li> <?php endwhile; ?> </ul> <?php else: ?> <h2>No Posts found</h2> <?php endif; ?> </div> <!-- Now for the ACF Stuff --> <?php if(get_field('care_list')): ?> <?php while(has_sub_field('care_list')): ?> <div class="grid_2 what-i-care-about gap"> <div class="important-img-container"> <?php the_sub_field('care_list_image'); ?> </div> <h3><?php the_sub_field('care_list_title'); ?></h3> </div> <?php endwhile; ?> <?php endif; ?> <?php get_footer(); ?> Please help a frustrated learner! Thanks in advance.

    Read the article

  • Updated to Android 2.2 and now my apps input-lines don't show well, do I need to update my SDK?

    - by Allan
    My Android app has a couple input-lines made to receive numbers, it's a calc app. I just updated my Nexus One to Android 2.2 and now my apps input-lines don't respond like the way they should. When I touch the input-line, the Android keyboard used to pop-up just enough to kind of 'lift' the input-line above the keyboard - into the users view. Then when I scrolled down to the next input-line, that input-line used to 'lift-up' into view also. Now, after I updated my N1 to Android 2.2 - the input-lines are not lifting into view all the way. Also, when I scroll down to the next input-line and type in numbers - they don't appear, but when I scroll left...there they are. It's hard to describe my problem but things have definitely changed in the way my apps input-lines respond since the 2.2 update I did. If I try to update my SDk stuff in Eclipse and then recompile my app, might that fix it? Whenever there's an Android update - developers don't always have to recompile all of their apps do they?

    Read the article

  • 3D and AI basics. The foundation before the coding.

    - by Allan
    Hi, everyone. (If you have the time and patience:) I've recently made the decision to study programming seriously and I'm about to order TAOCP and Concrete Mathematics to begin my studies (please don't get caught up on this). I'm very much interested in learning and understanding how 3D works but I'm aware that if I plan to do it right there's still a long walk before I get to actually play with 3D coding. Now to the question.. (tl;dr) Excluding programming itself, what disciplines do I have to be familiar with to code 3D? What kinds of mathematics? Physics? What else? What books do you recommend on such subjects? Now read it all again but replacing "3D" with "AI". Please don't recommend computer-specific books. The question is about the foundation to be learned before using the machine. Also, if possible, please keep the list brief; I plan to order one book on each subject but no more than that for now. Excuse me for any English mistakes, it's not my first language. Thank you.

    Read the article

  • Android: New app not showing on a sprint phone...

    - by Allan
    I uploaded my app to the Android Market last week and people have been purchasing it with no problems. My carrier is T-Mobile. As soon as I uploaded my app to the Market I got on my phone (Nexus One), searched for it, and there it was - instantly! (Is that because I have a google phone?) My friends G1 found it instantly also. BUT, another friend has a Sprint Moment phone and when he tried to search for it - it just wasn't there - like it didn't exist. I then called T-Mobile and Sprint representatives and found some information that I didn't know. The Sprint dude said that Sprint goes to some sort of massive Android Market Database and that's how Sprint knows about new apps and is then able to list them. New apps are not instantly shown on Sprint phones, you have to wait till their database updates to Android's database. At least that is what I thought they were trying to say to me. Has anyone else come across this issue and/or does anyone know how long Sprint takes to update their database for new Android apps? Do other carriers follow these methods?

    Read the article

  • UIImageView and UIScrollView load lot of pictures

    - by Allan.Chen
    In my app, i use UIImageView and UIScrollView to show lot of pictures(Every time there are about 20 pictures and every pictures about 600px*500px and size is about 600KB ), i use for this code to do this function. Here is code: //Here is pictures Data; self.klpArry = self.pictureData; CGSize size = self.klpScrollView1.frame.size; for (int i=0; i < [klpArr count]; i++) { UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake((size.width * i)+300, 20, 546, 546)]; NSString *filePath = [[NSBundle mainBundle] pathForResource:[klpArr objectAtIndex:i] ofType:@"jpg"]; UIImage *imageData = [[UIImage alloc]initWithData:[NSData dataWithContentsOfFile:filePath]]; [iv setImage:imageData]; iv.backgroundColor = [UIColor grayColor]; [self.klpScrollView1 addSubview:iv]; imageData = nil; iv = nil; iv.image = nil; filePath = nil; [imageData release]; [filePath release]; [iv release]; } // show the picture in scrollview; [self.klpScrollView1 setContentSize:CGSizeMake(size.width * numImage, size.height)]; self.klpScrollView1.pagingEnabled = YES; self.klpScrollView1.showsHorizontalScrollIndicator = NO; self.klpScrollView1.backgroundColor = [UIColor grayColor]; But everytime i init this function, the memory will increase about 5MB, Actually i release UIImageView, UIimage and UIScrollView (vi.image=nil,[vi release]) but i doesn't work, it can't release the memory. BTW, i use my friend code first vi.image=nil then vi=nil; but the pictures not to show on scrollview. any one can help me ?? Thx ~~

    Read the article

  • Compiling zlib for 64 bit on windows

    - by Allan Hollenberg
    I am currently working on a cross-platform game for Mac OSX and Windows and I'm having some issues with the ZLib library on Windows 64 bit. My game is focussed on a 64 bit architecture and I am unable to get ZLib to work along with it. When I compile ZLib itself (through make all64 at the source directory of ZLib) it shows no issues but when I want to use it I get a error saying '/usr/local/lib/libz.a(gzread.o):gzread.c:(.text+0x28e): undefined reference to `__errno'' I have included errno.h before I include zlib.h in my project but that doesn't seem to matter. I am compiling my app through the cygwin64 terminal and using the x86_64-w64-mingw32-g++ command, I am also linking directly against the lib64 version (if I remove that it compiles correctly but crashes on running due to it having a x86 lib)

    Read the article

  • PASS Summit 2011 &ndash; Part II

    - by Tara Kizer
    I arrived in Seattle last Monday afternoon to attend PASS Summit 2011.  I had really wanted to attend Gail Shaw’s (blog|twitter) and Grant Fritchey’s (blog|twitter) pre-conference seminar “All About Execution Plans” on Monday, but that would have meant flying out on Sunday which I couldn’t do.  On Tuesday, I attended Allan Hirt’s (blog|twitter) pre-conference seminar entitled “A Deep Dive into AlwaysOn: Failover Clustering and Availability Groups”.  Allan is a great speaker, and his seminar was packed with demos and information about AlwaysOn in SQL Server 2012.  Unfortunately, I have lost my notes from this seminar and the presentation materials are only available on the pre-con DVD.  Hmpf! On Wednesday, I attended Gail Shaw’s “Bad Plan! Sit!”, Andrew Kelly’s (blog|twitter) “SQL 2008 Query Statistics”, Dan Jones’ (blog|twitter) “Improving your PowerShell Productivity”, and Brent Ozar’s (blog|twitter) “BLITZ! The SQL – More One Hour SQL Server Takeovers”.  In Gail’s session, she went over how to fix bad plans and bad query patterns.  Update your stale statistics! How to fix bad plans Use local variables – optimizer can’t sniff it, so it’ll optimize for “average” value Use RECOMPILE (at the query or stored procedure level) – CPU hit OPTIMIZE FOR hint – most common value you’ll pass How to fix bad query patterns Don’t use them – ha! Catch-all queries Use dynamic SQL OPTION (RECOMPILE) Multiple execution paths Split into multiple stored procedures OPTION (RECOMPILE) Modifying parameter values Use local variables Split into outer and inner procedure OPTION (RECOMPILE) She also went into “last resort” and “very last resort” options, but those are risky unless you know what you are doing.  For the average Joe, she wouldn’t recommend these.  Examples are query hints and plan guides. While I enjoyed Andrew’s session, I didn’t take any notes as it was familiar material.  Andrew is a great speaker though, and I’d highly recommend attending his sessions in the future. Next up was Dan’s PowerShell session.  I need to look into profiles, manifests, function modules, and function import scripts more as I just didn’t quite grasp these concepts.  I am attending a PowerShell training class at the end of November, so maybe that’ll help clear it up.  I really enjoyed the Excel integration demo.  It was very cool watching PowerShell build the spreadsheet in real-time.  I must look into this more!  On a side note, I am jealous of Dan’s hair.  Fabulous hair! Brent’s session showed us how to quickly gather information about a server that you will be taking over database administration duties for.  He wrote a script to do a fast health check and then later wrapped it into a stored procedure, sp_Blitz.  I can’t wait to use this at my work even on systems where I’ve been the primary DBA for years, maybe there’s something I’ve overlooked.  We are using EPM to help standardize our environment and uncover problems, but sp_Blitz will definitely still help us out.  He even provides a cloud-based update feature, sp_BlitzUpdate, for sp_Blitz so you don’t have to constantly update it when he makes a change.  I think I’ll utilize his update code for some other challenges that we face at my work.

    Read the article

  • Easy way of daemonizing in CentOS 5.4

    - by Saif Bechan
    I know there is a program called upstart that can make it easy to make small daemons. I can't get this program to configure on CentOS. I get all sort of errors concerning pkg-congfig, libnih, and dbus. I am working on a node.ja application and this is a pain to start and stop all the time, so I want to create a deamon for this which makes it easy to start and stop.

    Read the article

  • Disable ipv6 support completely on debian squeeze 6.0.5

    - by markus
    I want to disable ipv6 support completely on debian squeeze 6.0.5. In many other posts I have seen setting the parameter net.ipv6.conf.all.disable_ipv6 = 1 in /etc/sysctl.conf should disable it. I've set that parameter and rebooted, but netstat -natp shows me that the ntp deamon is still using ipv6: udp6 0 0 :::123 :::* 0 7983 3138/ntpd Is there anything else I need to configure?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10  | Next Page >