Search Results

Search found 382 results on 16 pages for 'pierre 303'.

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

  • Why does Sql Server recommends creating an index when it already exist?

    - by Pierre-Alain Vigeant
    I ran a very basic query against one of our table and I noticed that the execution plan query processor is recommending that we create an index on a column The query is SELECT SUM(DATALENGTH(Data)) FROM Item WHERE Namespace = 'http://some_url/some_namespace/' After running, I get the following message // The Query Processor estimates that implementing the following index could improve the query cost by 96.7211%. CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>] ON [dbo].[Item] ([Namespace]) My problem is that I already have such index on that column: CREATE NONCLUSTERED INDEX [IX_ItemNamespace] ON [dbo].[Item] ( [Namespace] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] Why is Sql Server recommending me to create such index when it already exist?

    Read the article

  • Navigate from facebook tab to canvas page

    - by Pierre Olivier Martel
    My facebook application has a tab the user can install. On this tab, there is links that are suppose to link to application canvas (ex.: apps.facebook.com/my-app). It seems that when I'm on my user profile tab and click on a link, Facebook loads the page inside the tab. How do I force it to navigate out of the tab and into the canvas page?

    Read the article

  • How does this method give me a -61 Error?

    - by prestonmarshall
    This is in an application I am using called Mirth, but it appears to be coming from inside an Apache Commons library from a method that checks if something is indeed Base64 encoded or not. All of the docs say the only return is true or false, so how am I getting -61? -61 org.apache.commons.codec.binary.Base64.isBase64(Base64.java:137) org.apache.commons.codec.binary.Base64.discardNonBase64(Base64.java:478) org.apache.commons.codec.binary.Base64.decodeBase64(Base64.java:374) org.apache.commons.codec.binary.Base64.decode(Base64.java:220) com.webreach.mirth.plugins.pdfviewer.PDFViewer.viewAttachments(PDFViewer.java:51) com.webreach.mirth.client.ui.browsers.message.MessageBrowser$16.doInBackground(MessageBrowser.java:1429) com.webreach.mirth.client.ui.browsers.message.MessageBrowser$16.doInBackground(MessageBrowser.java:1426) org.jdesktop.swingworker.SwingWorker$1.call(SwingWorker.java:276) java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) java.util.concurrent.FutureTask.run(FutureTask.java:138) org.jdesktop.swingworker.SwingWorker.run(SwingWorker.java:315) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:637)

    Read the article

  • Communication between parent and child

    - by Pierre
    Hi every one ! I have a little problem. I have to code a simple C application that creat a process and his child (fork()) and I have to do an operation. Parent initialize the values and child calculate. I write this : #include #include #include #include #include typedef struct { int op1; char op; int op2; }Operation; Operation *varOP; void finalResult() { float result = 0; if(varOP-op == '+') result = (varOP-op1 + varOP-op2); if(varOP-op == '-') result = (varOP-op1 - varOP-op2); if(varOP-op == '*') result = (varOP-op1 * varOP-op2); if(varOP-op == '+') result = (varOP-op1 / varOP-op2); printf("%f",result); } int main () { int p; varOP = (Operation *)malloc(sizeof(Operation)); p = fork(); if(p == 0) // If child { signal(SIGUSR1, finalResult ); pause(); } if(p 0) // If parent { varOP-op = '+'; varOP-op1 = 2; varOP-op2 = 3; kill(p, SIGUSR1); wait(NULL); } return 0; } But my child is never called. Is there something wrong with my code? Thanks for your help !

    Read the article

  • Why would memcached refuse to store data with some keys ?

    - by Pierre
    Hello, I use the memcache extension for python, and I have a very strange problem. Memcached refuses to store the exact same data with some keys, and succeeds in caching some others. >>> conn.set('138b9c95d693760840aab85ee5591d2', 'test'); True >>> conn.set('138b9c95d693760840aab85ee5591d3', 'test'); 0 >>> conn.set('138b9c95d693760840aab85ee5591d4', 'test'); True >>> conn.set('138b9c95d693760840aab85ee5591d5', 'test'); 0 >>> conn.set('138b9c95d693760840aab85ee5591d6', 'test'); True >>> conn.set('138b9c95d693760840aab85ee5591d7', 'test'); 0 >>> conn.set('138b9c95d693760840aab85ee5591d8', 'test'); True >>> conn.set('138b9c95d693760840aab85ee5591d9', 'test'); True >>> conn.set('138b9c95d693760840aab85ee5591e0', 'test'); True >>> conn.set('138b9c95d693760840aab85ee5591e1', 'test'); True I don't really understand. I should add that I use the version 1.40 of the memcache module with memcached 1.2.8 running on Ubuntu Server 9.10. I restarted the memcached daemon, same result, with the same keys. Thanks. Update: I upgraded memcached to version 1.4.2, packaged on lucid repos, with the exact same result.

    Read the article

  • Delphi memory management design strategies : Object or Interface ?

    - by Pierre-Jean Coudert
    Regarding Delphi memory management, what are your design strategies ? What are the use cases where you prefer to create and release Objects manually ? What are the uses cases where Interfaces, InterfacedObjects, and their reference counting mechanism will be prefered ? Do you have identified some traps or difficulties with reference counted objects ? Thanks for sharing your experience here.

    Read the article

  • Browser displays page without styles for a short moment (visual glitch)

    - by Pierre
    I have observed that, very infrequently, Internet Explorer (7 or 8, it does not matter) displays our web pages (www.epsitec.ch) a short time without applying the CSS. The layout appears completely broken, with everything displayed sequentially from top to bottom. When the page has finished loading, everything finally gets displayed properly. Our web pages do not use any fancy scripting, just two javascript inclusions for QuantCast and Google Analytics, done at the end of the page. By the way, we already had the issue before adding the QuantCast script. The CSS gets linked in the <head> section: <head> <title>Crésus Comptabilité</title> <link rel="icon" href="/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="http://www.epsitec.ch/favicon.ico" /> <link href="../../style.css" rel="stylesheet" type="text/css" /> ... </head> and then follows static HTML up to the final chunk which includes the JavaScript: ... <div id="account"> <a class="deselect" href="/account/login">Identifiez-vous</a> <script type="text/javascript"> _qoptions={qacct:"..."}; </script> <script type="text/javascript" src="http://edge.quantserve.com/quant.js"> </script> <noscript> <img src="..." style="display: none;" border="0" height="1" width="1"/> </noscript> </div> <div id="contact"> <a href="/support/contact">Contactez-nous</a> </div> <div id="ending"><!-- --></div> </div> <script type="text/javascript"> ... </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("..."); pageTracker._initData(); pageTracker._trackPageview(); </script> </body> As this is a very short visual glitch, I have no idea what provokes it. Worse, I cannot reproduce it and it appears only on seldom occasions. How can I further investigate the cause of the glitch? Are there any best practices I should be aware of?

    Read the article

  • regular expression search in python

    - by Richard
    Hello all, I am trying to parse some data and just started reading up on regular Expressions so I am pretty new to it. This is the code I have so far String = "MEASUREMENT 3835 303 Oxygen: 235.78 Saturation: 90.51 Temperature: 24.41 DPhase: 33.07 BPhase: 29.56 RPhase: 0.00 BAmp: 368.57 BPot: 18.00 RAmp: 0.00 RawTem.: 68.21" String = String.strip('\t\x11\x13') String = String.split("Oxygen:") print String[1] String[1].lstrip print String[1] What I am trying to do is to do is remove the oxygen data (235.78) and put it in its own variable using an regular expression search. I realize that there should be an easy solution but I am trying to figure out how regular expressions work and they are making my head hurt. Thanks for any help Richard

    Read the article

  • ISBNdb Retrieving and Managing Info

    - by Pierre Sylvestre
    Given a set of databases how can one you get information on a book with given price first (which consist of the average of a hidden list of prices coming from different web site) and followed by an optional second option that shows the list of the different web site with their page? To take an example given a query for ISBN 9785554443331 - it returns "Chemistry the central science 11 edition" : new:$50 used good condition:$35 used poor condition:$20 If the return does not match with our product list an option to "click here to visit our partner" appears and which returns: Atextbook: $10 Btextbook: $10 Ctextbook: $9 Dtextbook: $8.50 I understand that the first search would be done simultaneous on the web and our database to determine whether or not we have the book and the web to get the average of the price of a given list of web site. Thank you in advance for the help

    Read the article

  • How to update the filename of a Django's FileField instance ?

    - by pierre-guillaume-degans
    Hello, Here a simple django model: class SomeModel(models.Model): title = models.CharField(max_length=100) video = models.FileField(upload_to='video') I would like to save any instance so that the video's file name would be a valid file name of the title. For example, in the admin interface, I load a new instance with title "Lorem ipsum" and a video called "video.avi". The copy of the file on the server should be "Lorem Ipsum.avi" (or "Lorem_Ipsum.avi"). Thank you :)

    Read the article

  • problem during data modification

    - by nectar
    here my code - if($pin == '105') { $sqltree = "INSERT INTO tbltree (`userId`, `level`, `superId`, `rootId`, `childcount`) VALUES ('$child1', '1', '$newid', '$myroot', '0');"; mysql_query($sqltree); update_level($newid); } function update_level() { //for 1st level $newid = $_SESSION['newid']; //getting senior's level 1 and to increase by 1 $sqlgetlevel = "SELECT superId,level1 FROM tbltree WHERE userID='$newid'"; echo "<br>test:".$sqlgetlevel; $result = mysql_query($sqlgetlevel,$link)or die(mysql_error()); //line 340 $row = mysql_fetch_array($result, MYSQL_ASSOC); $level1 = $row["level1"]; $level1 = $level1 + 1; //update increased level $sqlupdate = "UPDATE tbltree SET level1='$level1' WHERE userId='$newid';"; mysql_query($sqlupdate,$link)or die(mysql_error()); //change superId for new level $superid = $row["superId"]; } ERROR - test:SELECT superId,level1 FROM tbltree WHERE userID='29277640' Warning: mysql_query() expects parameter 2 to be resource, null given in C:\xampp\htdocs\303\levelupdate.php on line 340

    Read the article

  • Drupal 6: How to quickly theme a view ?

    - by Pierre-Jean Coudert
    I've defined a view with the cck and view2 modules. I would like to quickly define a template specific to this view. Any tutorial or information on this ? What are the files I need to modify ? Here are my findings: (Edited) In fact there are two ways to theme a view : the "field" way and the "node" way. In "edit View", you can choose "Row style: Node", or "Row style: Fields". with the "Node" way, you can create a node-contentname.tpl.php wich will be called for each node in the view. You'll have access to your cck field values with $field_name[0]['value']. (edit2) You can use node-view-viewname.tpl.php wich will be only called for each node displayed from this view. with the "Field" way, you add a views-view-field--viewname--field-name-value.tpl.php for each field you want to theme individually. Thanks to previous responses, I've used the following tools : In the 'Basic Settings' block, the 'Theme: Information' to see all the different templates you can modify. The Devel module's "Theme developer" to quickly find the field variable names. View 2 documentation, especially the "Using Theme" page.

    Read the article

  • delete last character UITextField

    - by Pierre
    Hi ! I have an UITextField and I just would like that every tap on a character, the first character is deleted. So just have one character in my textField every time. Moreover I would to to display every tap in the console log. Have you got an idea? Thanks!

    Read the article

  • JToolbar is hidden by JMenu

    - by pierre
    I'm using Netbeans to add a JToolbar to my window which also has a JMenuBar. Here is the design-time look: .. but during run-time I get this: With the toolbar seemingly partially hidden under the menu names. This is on the Mac, btw. Is there something stupid I've forgotten to do or some layout trick I should be using? EDIT: I'll add that the area below the toolbar is a SplitContainer.

    Read the article

  • How do you assign a variable with the result of a if..else block?

    - by Pierre Olivier Martel
    I had an argument with a colleague about the best way to assign a variable in an if..else block. His orignal code was : @products = if params[:category] Category.find(params[:category]).products else Product.all end I rewrote it this way : if params[:category] @products = Category.find(params[:category]).products else @products = Product.all end This could also be rewritten with a one-liner using a ternery operator (? :) but let's pretend that product assignment was longer than a 100 character and couldn't fit in one line. Which of the two is clearer to you? The first solution takes a little less space but I thought that declaring a variable and assigning it three lines after can be more error prone. I also like to see my if and else aligned, makes it easier for my brain to parse it!

    Read the article

  • Delphi -> Delphi prism, how to use array of records?

    - by Pierre
    Hi there. I'm learning Delphi Prism, and i don't find how to write the following code with it : type TRapportItem = record Label : String; Value : Int16; AnomalieComment : String; end; type TRapportCategorie = record Label : String; CategoriesItems : Array of TRapportItem; end; type TRapportContent = record Categories : array of TRapportCategorie; end; Then, somewhere, i try to put items in the array : rapport.Categories[i].Label:=l.Item(i).InnerText; But it doesn't work.. Can someone enlight me? Thanks!

    Read the article

  • Best way to deal with multiple layouts in symfony

    - by Pierre
    Hey folks. I'm looking for the best way to do something simple in symfony. Basically, I have a module in which all the pages will contain the same header and footer. That module also shares the same general layout as the other modules. I'm just wondering, should I create one file and have my content pages called up as partials or should all files have their own content and somehow call the two other templates. I made a quick example of my setup: http://grab.by/3Riy Hopefully, it'll help understand what I'm trying to do. Thanks!

    Read the article

  • Rails - CSV export: prompt for file download

    - by Pierre
    Hello, I want to give my users the ability to export a table to CSV. So in my controller, I've added on top of the file: respond_to :html, :js, :csv I'm also setting the headers if the requested format is csv: if params[:format] == 'csv' generate_csv_headers("negotiations-#{Time.now.strftime("%Y%m%d")}") end Code for generate_csv_headers(in application_controller) is: def generate_csv_headers(filename) headers.merge!({ 'Cache-Control' => 'must-revalidate, post-check=0, pre-check=0', 'Content-Type' => 'text/csv', 'Content-Disposition' => "attachment; filename=\"#{filename}\"", 'Content-Transfer-Encoding' => 'binary' }) end I've also created a view named index.csv.erb to generate my file: <%- headers = ["Id", "Name"] -%> <%= CSV.generate_line headers %> <%- @negotiations.each do |n| -%> <%- row = [ n.id, n.name ] -%> <%= CSV.generate_line row %> <%- end -%> I don't have any error, but it simply displays the content of the CSV file, while I'd expect a prompt from the browser to download the file. I've read a lot, but could not find anything that'd work. Do you have an idea? thanks, p.

    Read the article

  • How to get the current exception without having passing the variable?

    - by Pierre-Alain Vigeant
    I am looking for a way to retrieve the current exception without having to pass it as a variable. Suppose the following code public void MakeItFail() { try { throw new FailException(); } catch // Yes I'm aware that this shouldn't be done, but I don't want to go through all the code base and change it { ShowMessage("An error occured"); } } public void ShowMessage(string message) { // How can I retrieve the exception here } In the watch window, I can use $exception to get the current exception. Is there is a code equivalent?

    Read the article

  • How to create instances of a class from a static method?

    - by Pierre
    Hello. Here is my problem. I have created a pretty heavy readonly class making many database calls with a static "factory" method. The goal of this method is to avoid killing the database by looking in a pool of already-created objects if an identical instance of the same object (same type, same init parameters) already exists. If something was found, the method will just return it. No problem. But if not, how may I create an instance of the object, in a way that works with inheritance? >>> class A(Object): >>> @classmethod >>> def get_cached_obj(self, some_identifier): >>> # Should do something like `return A(idenfier)`, but in a way that works >>> class B(A): >>> pass >>> A.get_cached_obj('foo') # Should do the same as A('foo') >>> A().get_cached_obj('foo') # Should do the same as A('foo') >>> B.get_cached_obj('bar') # Should do the same as B('bar') >>> B().get_cached_obj('bar') # Should do the same as B('bar') Thanks.

    Read the article

  • Cascading S3 Sink Tap not being deleted with SinkMode.REPLACE

    - by Eric Charles
    We are running Cascading with a Sink Tap being configured to store in Amazon S3 and were facing some FileAlreadyExistsException (see [1]). This was only from time to time (1 time on around 100) and was not reproducable. Digging into the Cascading codem, we discovered the Hfs.deleteResource() is called (among others) by the BaseFlow.deleteSinksIfNotUpdate(). Btw, we were quite intrigued with the silent NPE (with comment "hack to get around npe thrown when fs reaches root directory"). From there, we extended the Hfs tap with our own Tap to add more action in the deleteResource() method (see [2]) with a retry mechanism calling directly the getFileSystem(conf).delete. The retry mechanism seemed to bring improvement, but we are still sometimes facing failures (see example in [3]): it sounds like HDFS returns isDeleted=true, but asking directly after if the folder exists, we receive exists=true, which should not happen. Logs also shows randomly isDeleted true or false when the flow succeeds, which sounds like the returned value is irrelevant or not to be trusted. Can anybody bring his own S3 experience with such a behavior: "folder should be deleted, but it is not"? We suspect a S3 issue, but could it also be in Cascading or HDFS? We run on Hadoop Cloudera-cdh3u5 and Cascading 2.0.1-wip-dev. [1] org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory s3n://... already exists at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:132) at com.twitter.elephantbird.mapred.output.DeprecatedOutputFormatWrapper.checkOutputSpecs(DeprecatedOutputFormatWrapper.java:75) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:923) at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:882) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1278) at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:882) at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:856) at cascading.flow.hadoop.planner.HadoopFlowStepJob.internalNonBlockingStart(HadoopFlowStepJob.java:104) at cascading.flow.planner.FlowStepJob.blockOnJob(FlowStepJob.java:174) at cascading.flow.planner.FlowStepJob.start(FlowStepJob.java:137) at cascading.flow.planner.FlowStepJob.call(FlowStepJob.java:122) at cascading.flow.planner.FlowStepJob.call(FlowStepJob.java:42) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.j [2] @Override public boolean deleteResource(JobConf conf) throws IOException { LOGGER.info("Deleting resource {}", getIdentifier()); boolean isDeleted = super.deleteResource(conf); LOGGER.info("Hfs Sink Tap isDeleted is {} for {}", isDeleted, getIdentifier()); Path path = new Path(getIdentifier()); int retryCount = 0; int cumulativeSleepTime = 0; int sleepTime = 1000; while (getFileSystem(conf).exists(path)) { LOGGER .info( "Resource {} still exists, it should not... - I will continue to wait patiently...", getIdentifier()); try { LOGGER.info("Now I will sleep " + sleepTime / 1000 + " seconds while trying to delete {} - attempt: {}", getIdentifier(), retryCount + 1); Thread.sleep(sleepTime); cumulativeSleepTime += sleepTime; sleepTime *= 2; } catch (InterruptedException e) { e.printStackTrace(); LOGGER .error( "Interrupted while sleeping trying to delete {} with message {}...", getIdentifier(), e.getMessage()); throw new RuntimeException(e); } if (retryCount == 0) { getFileSystem(conf).delete(getPath(), true); } retryCount++; if (cumulativeSleepTime > MAXIMUM_TIME_TO_WAIT_TO_DELETE_MS) { break; } } if (getFileSystem(conf).exists(path)) { LOGGER .error( "We didn't succeed to delete the resource {}. Throwing now a runtime exception.", getIdentifier()); throw new RuntimeException( "Although we waited to delete the resource for " + getIdentifier() + ' ' + retryCount + " iterations, it still exists - This must be an issue in the underlying storage system."); } return isDeleted; } [3] INFO [pool-2-thread-15] (BaseFlow.java:1287) - [...] at least one sink is marked for delete INFO [pool-2-thread-15] (BaseFlow.java:1287) - [...] sink oldest modified date: Wed Dec 31 23:59:59 UTC 1969 INFO [pool-2-thread-15] (HiveSinkTap.java:148) - Now I will sleep 1 seconds while trying to delete s3n://... - attempt: 1 INFO [pool-2-thread-15] (HiveSinkTap.java:130) - Deleting resource s3n://... INFO [pool-2-thread-15] (HiveSinkTap.java:133) - Hfs Sink Tap isDeleted is true for s3n://... ERROR [pool-2-thread-15] (HiveSinkTap.java:175) - We didn't succeed to delete the resource s3n://... Throwing now a runtime exception. WARN [pool-2-thread-15] (Cascade.java:706) - [...] flow failed: ... java.lang.RuntimeException: Although we waited to delete the resource for s3n://... 0 iterations, it still exists - This must be an issue in the underlying storage system. at com.qubit.hive.tap.HiveSinkTap.deleteResource(HiveSinkTap.java:179) at com.qubit.hive.tap.HiveSinkTap.deleteResource(HiveSinkTap.java:40) at cascading.flow.BaseFlow.deleteSinksIfNotUpdate(BaseFlow.java:971) at cascading.flow.BaseFlow.prepare(BaseFlow.java:733) at cascading.cascade.Cascade$CascadeJob.call(Cascade.java:761) at cascading.cascade.Cascade$CascadeJob.call(Cascade.java:710) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)

    Read the article

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