Search Results

Search found 416 results on 17 pages for 'marc gravell'.

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

  • Error "E_UNEXPECTED(0x8000FFFF)" when using CDec/CInt/IsNumeric

    - by Marc vB
    I have encountered a strange problem, which I could solve but don't understand why it did occur. I have build a DLL with COM enabled. In this DLL I have classes that did use the functions CInt, CDec and IsNumeric. If I test these classes from a .NET application then it works ok. But when I called/run these classes from a Win32 application (with COM) then I did get an "E_UNEXPECTED(0x8000FFFF)" error. After some debugging I found out that the problem would go away if I: - replaced IsNumeric with Integer.TryParse or Decimal.TryParse - replaced CInt with Integer.Parse - replaced CDec with Decimal.Parse Can anyone explain this? Again, I could solve it by doing this but I would like to know why.

    Read the article

  • RewriteRule on special querystring

    - by marc
    My URLS the page names example: ?Contact- or ?Product- some have a longer querystring example: ?Contact-&go=Admin domain.com/?Contact-&go=Admin I would like a RewriteRule to use domain.com/Contact/Admin thanks

    Read the article

  • Which CDN offers rewrite rules for urls

    - by Marc
    I'm looking for a Content Delivery Network which offers the ability to make images available through multiple urls while they exist physically only one time. I want to generate seo friendly image urls with the relevant keywords in different languages. Thanks for your advice!

    Read the article

  • Load SQL query result data into cache in advance

    - by Marc
    I have the following situation: .net 3.5 WinForm client app accessing SQL Server 2008 Some queries returning relatively big amount of data are used quite often by a form Users are using local SQL Express and restarting their machines at least daily Other users are working remotely over slow network connections The problem is that after a restart, the first time users open this form the queries are extremely slow and take more or less 15s on a fast machine to execute. Afterwards the same queries take only 3s. Of course this comes from the fact that no data is cached and must be loaded from disk first. My question: Would it be possible to force the loading of the required data in advance into SQL Server cache? Note My first idea was to execute the queries in a background worker when the application starts, so that when the user starts the form the queries will already be cached and execute fast directly. I however don't want to load the result of the queries over to the client as some users are working remotely or have otherwise slow networks. So I thought just executing the queries from a stored procedure and putting the results into temporary tables so that nothing would be returned. Turned out that some of the result sets are using dynamic columns so I couldn't create the corresponding temp tables and thus this isn't a solution. Do you happen to have any other idea?

    Read the article

  • fgets in c don't return a portion of an string

    - by Marc
    Hi! I'm totally new in C, and I'm trying to do a little application that searches a string into a file, my problem is that I need to open a big file (more than 1GB) with just one line inside and fgets return me the entire file (I'm doing test with a 10KB file). actually this is my code: #include <stdio.h> #include <string.h> int main(int argc, char *argv[]) { char *search = argv[argc-1]; int retro = strlen(search); int pun = 0; int sortida; int limit = 10; char ara[20]; FILE *fp; if ((fp = fopen ("SEARCHFILE", "r")) == NULL){ sortida = -1; exit (1); } while(!feof(fp)){ if (fgets(ara, 20, fp) == NULL){ break; } //this must be a 20 bytes line, but it gets the entyre 10Kb file printf("%s",ara); } sortida = 1; if(fclose(fp) != 0){ sortida = -2; exit (1); } return 0; } What can I do to find an string into a file? I'v tried with GREP but it don't helps, because it returns the position:ENTIRE_STRING. I'm open to ideas. Thanks in advance!

    Read the article

  • css calculation of the width

    - by marc-andre menard
    I got into a math problem my content box is 700pc wide my hentry (inside content) is 100% wide with padding of 10px wich make the hentry to be wider that the content resulting and overflow... Any solution Here is the page : http://www.equipe94.com I have firebug and removing the width 100% work, but it send by wordpress so how to overwrite a width:100% with nothing ?

    Read the article

  • php : echo"", print(), printf()

    - by marc-andre menard
    Is there a better way to output data to html page with PHP ? if i like to make a div with some var in php i will write something like that print ('<div>'.$var.'</div>); or echo "'<div>'.$var.'</div>'"; what is the PROPER way to do that ? or a better way, fill a $tempvar and print it once? like that: $tempvar = '<div>'.$var.'</div>' print ($tempvar); in fact, in real life, the var will be fill with much more !

    Read the article

  • How to detect Windows 64 bit platform with .net?

    - by Marc
    In a .net 2.0 C# application I use the following code to detect the operating system platform: string os_platform = System.Environment.OSVersion.Platform.ToString();<br/> This returns "Win32NT". The problem is that it returns "Win32NT" even when running on Windows Vista 64bit. Is there any other method to know the correct platform (32 or 64bit)? Note that it should also detect 64bit when run as 32bit app on Windows 64bit.

    Read the article

  • Problem with assigning elements of a class array to individual variables in MATLAB

    - by Marc
    This is a bit of a duplicate of this question, this question, and this question, however those solutions don't work, so I'm asking mine. I've got an array of locally defined classes and I'd like to assign it to multiple, individual variables. This pattern doesn't work: %a is 2x1 of MyClass temp = mat2cell(a); [x,y] = temp{:}; %throws: ??? Insufficient number of outputs from right hand side of equal sign to satisfy assignment. Because temp is a single cell, with my 2x1 array in one cell, rather than a 2x1 cell array with one element of each of my original array in one cell. Any ideas?

    Read the article

  • JSF inner datatable not respecting rendered condition of outer table.

    - by Marc
    <h:dataTable cellpadding="0" cellspacing="0" styleClass="list_table" id="OuterItems" value="#{valueList.values}" var="item" border="0"> <h:column rendered="#{item.typeA"> <h:dataTable cellpadding="0" cellspacing="0" styleClass="list_table" id="InnerItems" value="#{item.options}" var="option" border="0"> <h:column > <h:outputText value="Option: #{option.displayValue}"/> </h:column> </h:dataTable> </h:column> <h:column rendered="#{item.typeB"> <h:dataTable cellpadding="0" cellspacing="0" styleClass="list_table" id="InnerItems" value="#{item.demands}" var="demand" border="0"> <h:column > <h:outputText value="Demand: #{demand.displayValue}"/> </h:column> </h:dataTable> </h:column> </h:dataTable> public class Item{ ... public boolean isTypeA(){ return this instanceof TypeA; } public boolean isTypeB(){ return this instanceof TypeB; } ... } public class typeA extends Item(){ ... public List getOptions(){ .... } ... } public class typeB extends Item(){ ... public List getDemands(){ ... } .... } I'm having an issue with JSF. I've abstracted the problem out here, and I'm hoping someone can help me understand how what I'm doing fails. I'm looping over a list of Items. These Items are actually instances of the subclasses TypeA and TypeB. For Type A, I want to display the options, for Type B I want to display the demands. When rendering the page for the first time, this works fine. However, when I post back to the page for some action, I get an error: [3/26/10 12:52:32:781 EST] 0000008c SystemErr R javax.faces.FacesException: Error getting property 'options' from bean of type TypeB at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:89) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java(Compiled Code)) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91) at com.ibm.faces.portlet.FacesPortlet.processAction(FacesPortlet.java:193) My grasp on the JSF lifecyle is very rough. At this point, i understand there is an error in the ApplyRequestValues Phases which is very early and so the previous state is restored and nothing changes. What I don't understand is that in order to fufill the condition for rendering "item.typeA" that object has to be an instance of TypeA. But here, it looks like that object passed the condition even though it was an instance of TypeB. It is like it is evaluating the inner dataTable (InnerItems) before evaluating the outer (outerItems). My working assumption is that I just don't understand how/when the rendered attribute is actually evaluated.

    Read the article

  • How to convert a .NET WebService-Method-Result (Soap) into its original datatype?

    - by Marc
    Hello everyone. I have two "identical" webservices (Soap) on two different servers. Don't ask why :-) WebService-1 decides if it handels the request itself or if it passes the request to WebService-2. If so, the response of WebService-2 should directly be returned from WebService-1. The response datatype is complex and self defined. With simple datatypes like 'int or 'string' there would be no problem. The response of WebService-2 is a serialized object (I think it is called "stubs") and theredore it is not possibel to pass this object through as the response of WebService-1 because the type of the objects doesn't match. Is there a simple way to convert the serialised datatype into its original type without buiding a complex converter?

    Read the article

  • How to implement a lazy loaded Silverlight data grid without using paging

    - by Marc Wittke
    Using the Business Application template from the brand new released RIA Services, you can see lots of examples using the data grid on top of a DomainDataSource in combination with a DataPager. The properties PageSize and LoadSize can be used to adjust the amount of data to be displayed in one page and the data that is prefetched in the background. Now I'd like to have a data grid with a scrollbar and no pager. The underlying DomainDataSource should load only the data that is diplayed in the grid. It should trigger another load, when the user scrolls down to items that are not yet in the data context. Is there any sample implementation how to do this?

    Read the article

  • C# Regex - Match and replace, Auto Increment

    - by Marc Still
    I have been toiling with a problem and any help would be appreciated. Problem: I have a paragraph and I want to replace a variable which appears several times (Variable = @Variable). This is the easy part, but the portion which I am having difficulty is trying to replace the variable with different values. I need for each occurrence to have a different value. For instance, I have a function that does a calculation for each variable. What I have thus far is below: private string SetVariables(string input, string pattern){ Regex rx = new Regex(pattern); MatchCollection matches = rx.Matches(input); int i = 1; if(matches.Count > 0) { foreach(Match match in matches) { rx.Replace(match.ToString(), getReplacementNumber(i)); i++ } } I am able to replace each variable that I need to with the number returned from getReplacementNumber(i) function, but how to I put it back into my original input with the replaced values, in the same order found in the match collection? Thanks in advance! Marcus

    Read the article

  • AudioRecord problems with non-HTC devices

    - by Marc
    I'm having troubles using AudioRecord. An example using some of the code derived from the splmeter project: private static final int FREQUENCY = 8000; private static final int CHANNEL = AudioFormat.CHANNEL_CONFIGURATION_MONO; private static final int ENCODING = AudioFormat.ENCODING_PCM_16BIT; private int BUFFSIZE = 50; private AudioRecord recordInstance = null; ... android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO); recordInstance = new AudioRecord(MediaRecorder.AudioSource.MIC, FREQUENCY, CHANNEL, ENCODING, 8000); recordInstance.startRecording(); short[] tempBuffer = new short[BUFFSIZE]; int retval = 0; while (this.isRunning) { for (int i = 0; i < BUFFSIZE - 1; i++) { tempBuffer[i] = 0; } retval = recordInstance.read(tempBuffer, 0, BUFFSIZE); ... // process the data } This works on the HTC Dream and the HTC Magic perfectly without any log warnings/errors, but causes problems on the emulators and Nexus One device. On the Nexus one, it simply never returns useful data. I cannot provide any other useful information as I'm having a remote friend do the testing. On the emulators (Android 1.5, 2.1 and 2.2), I get weird errors from the AudioFlinger and Buffer overflows with the AudioRecordThread. I also get a major slowdown in UI responsiveness (even though the recording takes place in a separate thread than the UI). Is there something apparent that I'm doing incorrectly? Do I have to do anything special for the Nexus One hardware?

    Read the article

  • Load list of image from folder

    - by marc-andre menard
    I have a folder of images, from 10 to 200, a webpage, a jquery fade and a php script that read folder full of images Is there any way to make the php script scan a folder, get a list of image (in an array ?) and pass it to jquery script ? (first question) Now, i can make a xml file from the result php list of files found or make a html <li> from the list in the html. is there ANY other way to do that ? (question #2)

    Read the article

  • Debugged Program Window Won't Close

    - by Marc Bernier
    Hi, I'm using VS 2008 on a 64-bit XP machine. I'm debugging a 32-bit C++ DLL via a console program. The DLL and EXE projects are contained in the same SLN so that I can modify the DLL as I test. What happens is that every once in a while I kill the program with Debug | Stop Debugging (Shift-F5). VS stops the program, but the console window stays open! If I'm sitting at a breakpoint and hit Shift-F5, it will terminate properly, but if the program is running full-tilt when I stop it, I often see this instead. The big problem is that I can't close these zombie windows. Using End Task in Task Manager does nothing (no message, no nothing). When I shut down the machine, it is unable to due to the orphans and I have to resort to actually turning off the power. I think this is connected to having the DLL and EXE project in the same SLN, as for months I worked on this project in 2 VS instances, one for the DLL and the other for the EXE. I would continually jump back and forth between the windows as I worked. This problem never happened until I put the two projects into a single SLN. The single SLN works a lot better, but this anomaly is very irritating. Any ideas anyone? UPDATE After a bit of searching (here), I found that it appears to have to do with one of the updates from last Tuesday (KB977165 or KB978037). Thank you Microsoft for your excellent pre-release testing.

    Read the article

  • Why does System.Net.Mail work in one part of my c#.net web app, but not in another?

    - by Marc
    I have a web application that is running on IIS within my company's domain, and is being accessed via intranet. I have this application sending out email based on some user actions. For example, its a scheduling application in part, so if a task is completed, an email is sent out notifying other users of that. The problem is, the email works flawlessly in some cases, and not at all in others. I have a login.aspx page which sends out report emails when the page is loaded (its loaded once a day via windows task scheduler) - this always seems to work perfectly. I have an update page which is supposed to send email when text is entered and the "Update" button is clicked - this operation will fail most of the time. Both of these tasks use the same static overloaded method I wrote to send email using System.Net.Mail. I have tried using gmail as my smtp server (instead of our internal one), and get the same results. I investigated whether having the local SMTP Service running makes any difference, and it doesn't seem to. Besides, since C# is server-side code, shouldn't it only matter whats running on the server, and not the client? Please help me figure out whats wrong! Where should I look? What can I try?

    Read the article

  • Images or files in GNU Smalltalk?

    - by Marc
    Hi, I'm new to Smalltalk. I think I understand the basics of the language and now want to start with GNU Smalltalk (as it's free and has bindings for GTK). As I'm coming from the PHP and Java-Corner, I'm not familiar with the concept of the Smalltalk images. And I even read now, that you don't need to use images in GNU Smalltalk. Now I'm confused ;-) So is it possible to work with files and to include the classes I need with the PackageLoader class? I would be happy when I could use my favourite texteditor (vim) for coding instead of an IDE, too ;-) Please enlight me :-)

    Read the article

  • Graph call "/me/friends" doesn't contain names if called from a testuser

    - by Marc
    When I log into Facebook with my account and call the Graph API with /me/friends it returns an array like this: [ {id: "6868...", name: "John Smith"}, {id: "7531...", name: "Diane Smith"}, ... ] But if I'm logged in with a Facebook testuser and do the same call I get an array like this: [ {id: "100002927..."}, {id: "100003151..."}, ... ] So I'm missing the name property. Bug? Or did I some mistake? I'm using the JS SDK, but I think that doesn't matter.

    Read the article

  • Expanding Rows for Unique Checkboxes

    - by Marc Morgan
    I was just recently given a project for my job to write a script that compares two mysql databases and print out information into an html table. Currently, I am trying to insert a checkbox by each individual's name and when selected, rows pertaining to that individual will expand underneath the person's name. I am combining javascript into my script to do this, although I really have no experience is it. The problem I am having is that when any checkbox is selected, all the rows for each individual is expanding instead of the rows pertaining only to the one individual selected. Here is the coding so far: <?php $link = mysql_connect ($server = "harris.lib.fit.edu", $username = "", $password = "") or die(mysql_error()); $db = mysql_select_db ("library-test") or die(mysql_error()); $ids = mysql_query("SELECT * FROM `ifc_studylog`") or die(mysql_error()); //not single quotes (tilda apostrophy) $x=0; $n=0; while($row = mysql_fetch_array( $ids )) { $tracksid1[$x] = $row['fitID']; $checkin[$x] = $row['checkin']; $checkout[$x] = $row['checkout']; $n++; $x++; } $names = mysql_query("SELECT * FROM `ifc_users`") or die(mysql_error()); //not single quotes (tilda apostrophy) $x=0; while($row = mysql_fetch_array( $names )) { $tracksnamefirst[$x] = $row['firstName']; $tracksnamesecond[$x] = $row['lastname']; $tracksid2[$x] = $row['fitID']; $tracksuser[$x] = $row['tracks']; $x++; } $x=0; foreach($tracksid2 as $comparename) { $chk = strval($x); ?> <script type='text/javascript' src='http://code.jquery.com/jquery-1.4.2.js'></script> <script type='text/javascript'> $(window).load(function () { $('.varx').click(function () { $('.text').toggle(this.checked); });}); </script> <?php echo '<td><input id = "<?=$chk?>" type="checkbox" class="varx" /></td>'; echo '<td align="center">'.$comparename.'</td>'; echo'<td align="center">'.$tracksnamefirst[$x].'</td>'; echo'<td align="center">'.$tracksnamesecond[$x].'</td>'; $z=0; foreach($tracksid1 as $compareid) { $HH=0; $MM =0; $SS =0; if($compareid == $comparename)// && $tracks==$tracksuser[$x]) { $SS = sprintf("%02s",(($checkout[$z]-$checkin[$z])%60)); $MM = sprintf("%02s",(($checkout[$z]-$checkin[$z])/60 %60)); $HH = sprintf("%02s",(($checkout[$z]-$checkin[$z])/3600 %24)); // echo'<td align="center">'.$HH.':'.$MM.':'.$SS.'</td>'; echo '</tr>'; echo '<tr>'; echo "<td id='txt' class='text' align='center' colspan='2' style='display:none'></td>"; echo "<td id='txt' class='text' align='center' style='display:none'>".$checkin[$z]."</td>"; echo '</tr>'; } echo '<tr>'; $z++; echo '</tr>'; } $x++; } } ?> Any Help is appreciated and sorry if I am too vague on the subject. The username and password is left off for security purposes.

    Read the article

  • PHP Magic faster than simply setting the class attribute?

    - by Marc Trudel
    Well, not exactly that, but here is an example. Can anyone explain the difference between B and C? How can it be faster to use a magic function to dynamically set a value instead of simply setting the value in the attribute definition? Here is some code: [root@vm-202-167-238-17 ~]# cat test.php; for d in A B C; do echo "------"; ./test.php $d; done; #!/usr/bin/php <?php $className = $argv[1]; class A { public function __get($a) { return 5; } } class B { public $a = 5; } class C { public function __get($a) { $this->a = 5; return 5; } } $a = new $className; $start = microtime(true); for ($i=0; $i < 1000000; $i++) $b = $a->a; $end = microtime(true); echo (($end - $start) * 1000) ." msec\n"; ------ 598.90794754028 msec ------ 205.48391342163 msec ------ 189.7759437561 msec

    Read the article

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