Search Results

Search found 28563 results on 1143 pages for 'strange but true'.

Page 20/1143 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Strange behaviour with Microsoft.WindowsCE.Forms

    - by Mohammadreza
    I have a Windows Mobile application in which I want to check the device orientation. Therefore I wrote the following property in one of my forms: internal static Microsoft.WindowsCE.Forms.ScreenOrientation DeviceOriginalOrientation { get; private set; } The strange thing is that after that whenever I open a UserControl, the designer shows this warning even if that UserControl doesn't use the property: Could not load file or assembly 'Microsoft.WindowsCE.Forms, Version=3.5.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Commenting the above property will dismiss the warning and shows the user control again. The application is built successfully and runs without any problems in both cases. Does anybody know why this happens and how can I fix it?

    Read the article

  • camera preview on androd - strange lines on 1.5 version of sdk

    - by Marko
    Hi all, I am developing the camera module for an android application. In main application when user clicks on 'take picture' button, new view with SurfaceView control is opened and camera preview is shown. When users click on dpad center, camera takes picture and save it to the disc. Pretty simple and straightforward. Everything works fine on my device - HTC Tattoo, minsdkversion 1.6 ...but when I tested application on HTC Hero minsdkversion 1.5, when camera preview is shown,some strange lines occur. Anyone has idea what is going on? p.s. altough preview is crashed, taking of pictures works fine here is the picture: Thanx Marko

    Read the article

  • Strange Scala error.

    - by Lukasz Lew
    I tried to create abstract turn based Game and abstract AI: abstract class AGame { type Player type Move // Player inside def actPlayer : Player def moves (player : Player) : Iterator[Move] def play (move : Move) def undo () def isFinished : Boolean def result (player : Player) : Double } abstract class Ai[Game <: AGame] { def genMove (player : Game#Player) : Game#Move } class DummyGame extends AGame { type Player = Unit type Move = Unit def moves (player : Player) = new Iterator[Move] { def hasNext = false def next = throw new Exception ("asd") } def actPlayer = () def play (move : Move) { } def undo () { } def isFinished = true def result (player : Player) = 0 } class DummyAi[Game <: AGame] (game : Game) extends Ai[Game] { override def genMove (player : Game#Player) : Game#Move = { game.moves (player).next } } I thought that I have to use this strange type accessors like Game#Player. I get very puzzling error. I would like to understand it: [error] /home/lew/Devel/CGSearch/src/main/scala/Main.scala:41: type mismatch; [error] found : Game#Player [error] required: DummyAi.this.game.Player [error] game.moves (player).next [error] ^

    Read the article

  • Strange fstream problem

    - by noname
    Hi, I have really strange problem. In Visual C++ express, I have very simple code, just: #include <fstream> using namespace std; int main() { fstream file; file.open("test.txt"); file<<"Hello"; file.close(); } This same code works OK in my one project, but when I create now project and use this same lines of code, no file test.txt is created. Please, what is wrong?¨ EDIT: I expect to see test.txt in VS2008/project_name/debug - just like the first functional project does.

    Read the article

  • Strange padding in Safari when using SVG images

    - by Naman Goel
    I thought I was having issues with margins but then on a closer look I found that SVGs are acting funky in Safari 6. I am building a simple Hexagon based website. Of course I used negative vertical margins to for a little overlap to 'inter-lock' the hexagons. And to save space I was using SVG images for the hexagons. It works great in chrome and firefox, but in Safari, there is a strange padding in the SVG images. I'm using simple img tags for the svg images. Everything works when I switch to PNG, but I'd prefer to stick to SVGs. Any insight? Can I perhaps delve into the SVG code and somehow fix the SVG problem in Safari? or is it some sort of bug, that I can do nothing about without browser sniffing?

    Read the article

  • Getting strange response on calling verifyReceipt to verify an in-app

    - by lostInTransit
    Hi I am making a call to verifyReceipt to validate an in-app purchase but am getting a very strange response (the response is b) The same code worked till some time back. But I stopped the app debugging while the trans was being verified at one point. From there on, the only response I get is b. I checked the code and it has nothing wrong. As I said, the same code worked till I stopped this trans mid-way. Any idea what could be wrong? Thanks.

    Read the article

  • Strange/simple batch question regarding Java/Ant

    - by Monster
    For my company, I'm making a batch script to go through and compile the latest revisions of code for our current project. I'm using Ant to build the class files, but encountered a strange error. One of the source files imports .* from a directory, where there are no files (only folders), and in fact, the folders needed are imported right after. It compiles perfectly fine in Eclipse, but I'm using an Ant script to automate it outside of the IDE, and Javac throws an error when it encounters this line. Is there any automated procedure I can use to ignore/suppress this error with javac in Ant? I'd even go so far as to create a dummy file in the importing directory, but all of that in contained in a Jar file I don't wish to have to decompress and then recompress with the dummy file. Thanks!

    Read the article

  • Strange profiling results: definitely non-bottleneck method pops up

    - by jkff
    I'm profiling a program using sampling profiling in YourKit and JProfiler, and also "manually" (I launch it and press Ctrl-Break several times to get thread dumps). All three methods give me extremely strange results: some tens of percents of time spent in a 3-line method that does not even do any allocation or synchronization and doesn't have loops etc. Moreover, after I made this method into a NOP and even removed its invocation completely, the observable program performance didn't change at all (although it got a negligible memory leak, since it was a method for freeing a cheap resource). I'm thinking that this might be because of the constraints that JVM puts on the moments at which a thread's stacktrace may be taken, and it somehow turns out that in my program it is exactly the moments where this method is invoked, although there is absolutely nothing special about it or the context in which it is invoked. What can be the explanation for this phenomenon? What are the aforementioned constraints? What further measurements can I take to clarify the situation?

    Read the article

  • Python beginner, strange output problem

    - by Protean
    I'm having a weird problem with the following piece of code. from math import sqrt def Permute(array): result1 = [] result2 = [] if len(array) <= 1: return array for subarray in Permute(array[1:]): for i in range(len(array)): temp1 = subarray[:i]+array[0]+subarray[i:] temp2 = [0] for num in range(len(array)-1): temp2[0] += (sqrt(pow((temp1[num+1][1][0]-temp1[num][1][0]),2) + pow((temp1[num+1][1][1]-temp1[num][1][1]),2))) result1.append(temp1+temp2) return result1 a = [['A',[50,1]]] b = [['B',[1,1]]] c = [['C',[100,1]]] array = [a,b,c] result1 = Permute(array) for i in range(len(result1)): print (result1[i]) print (len(result1)) What it does is find all the permutations of the points abc and then returns them along with the sum of the distances between each ordered point. It does this; however, it also seems to report a strange additional value, 99. I figure that the 99 is coming from the computation of the distance between point a and c but I don't understand why it is appearing in the final output as it does.

    Read the article

  • Blackberry Widget Packager saves my files in strange places

    - by chibineku
    I have just installed the Blackberry Widget Packager and Blackberry Web Plug-In for Eclipse, and everything works fine, but my files are output to strange places. For example, I tried putting my zipped source files in the folder Blackberry Widget Packager/web and I got an error during packaging. Packaging works when the .zip is in the same directory as wwbp, though. When a widget is successfully created, the executable .jar file and the .rapc files are put in some stupid folder like users/user/temp/widgetname094098456, and the other files are split between two folders in Blackberry Widget Packager/bin. This is slightly annoying as I don't want to be spending time herding my files. Anyone have any thoughts on why my files are being scattered like this?

    Read the article

  • Strange findFn malfunction

    - by gd047
    I noticed a strange malfunction in using findFn function (library sos) and I can't find out the source. While it works fine on my Windows XP pc, it does not on my Vista one. library (sos) findFn("randomization test") # in both finds 72 results findFn("{randomization test}") # In XP finds 19 or about so, but in Vista whenever I use {} and more than one word inside, # I keep getting the following: found 0 matches x has zero rows; nothing to display. Warning message: In findFn("{randomization test}") : HIT not found in HTML; processing one page only. R ver = 2.10.1 and packages updated. Any ideas where the problem might be? Bonus: As it's obvious, I was looking for functions about tests for randomized experiments

    Read the article

  • Strange problem when converting RGB to HSV

    - by zaplec
    Hi, I made a small RGB to HSV converter algorithm with C. It seems to work pretty well, but there is one strange problem: If I first convert i.e. a 800x600 picture into HSV map and then back to RGB map without doing any changes in the values, I get some pixels that are convertet incorrectly. Then if I try to convert those misbehaving single pixels alone to and back, they're converted correctly. Any idea what could be the problem? I'm using Daniel Karlings PNGLite to open that PNG file. Here are the source code of my main.c, rgbtohsv.c and rgbtohsv.h rgbToHsv.h rgbToHsv.c pngmain.c I linked pngmain only that if somebody wants to test and run this on his own system. -zaplec

    Read the article

  • strange results with /fp:fast

    - by martinus
    We have some code that looks like this: inline int calc_something(double x) { if (x > 0.0) { // do something return 1; } else { // do something else return 0; } } Unfortunately, when using the flag /fp:fast, we get calc_something(0)==1 so we are clearly taking the wrong code path. This only happens when we use the method at multiple points in our code with different parameters, so I think there is some fishy optimization going on here from the compiler (Microsoft Visual Studio 2008, SP1). Also, the above problem goes away when we change the interface to inline int calc_something(const double& x) { But I have no idea why this fixes the strange behaviour. Can anyone explane this behaviour? If I cannot understand what's going on we will have to remove the /fp:fastswitch, but this would make our application quite a bit slower.

    Read the article

  • UITableViewCell and strange behaviour in grouped UITableView

    - by evangelion2100
    I'm working on a grouped UITableView, with 4 sections with one row per section, and have a strange behaviour with the cells. The cells are plain UITableViewCells, but the height of the cells are around 60 - 80 pixel. Now the tableview renders the cells correct with round corners, but when I select the cells, they appear blue and recangle. I don't know why the cells behave like this, because I have another grouped UITableView with custom cells and 88 pixel height and those cells work like they should. If I change the height to the default height of 44 pixel, the cells behave like the should. Does anyone know about this behaviour and what the cause is? Like I mentioned, I don't do any fancy stuff I use default UITableViewCells in a static, grouped UITableView with 4 sections with 1 row in each section. evangelion2100

    Read the article

  • HTML/Javascript Strange behavior with input field and TABBING

    - by Berlin Brown
    I have a strange error where if a user enters in data, say first name and then tabs, the text in the field is highlighted/selected as opposed to moving to the next. So, a person may type the first name and then tab to the next input item, text is selected and then they hit a character and now the name they typed in is deleted. If I use the default [input] tags, the tab works properly. But in the code below, with keyup, that may change the tabbing behavior. How can I get my code where it won't select the text. This is replicated in Firefox and Internet Explorer. function enableSearch(lnameObj) { var goButtonObj = document.getElementById('goButton'); var nextButtonObj = document.getElementById('nextButton'); var lastName = lnameObj.value; if (lastName == "") { goButtonObj.disabled = true; } else { goButtonObj.disabled = false; } } <input type="text" size="12" name="lastname" onKeyUp="return enableSearch(this);" value="">

    Read the article

  • Array.Copy: strange exception while concatenating two byte arrays

    - by robob
    In a application of mine that is developed in C# I have the following code: byte[] resb = new byte[Buffer.ByteLength(blockAr) + Buffer.ByteLength(previous)]; Array.Copy(blockAr, 0, resb,0, blockAr.Length); Array.Copy(previous, 0, resb, blockAr.Length, previous.Length); It's a very simple code to concatenate two byte arrays. The problem is that in some particular situation that I don't know I have that exception: ArgumentOutOfRangeException: sourceIndex is less than the lower bound of the first dimension of sourceArray. I cannot see any of strange in my code and I am not able to reproduce the exception. Could anyone help me to identify the problem? thanks

    Read the article

  • Strange problem with ie6 messing up layout, and fixing byitself some time after loading

    - by 0al0
    We have a big ie6 layout problem with a newly launched website: in the header in our homepage, we have a coda-slider, and apparently its messing upt the wole layout of the front page. I have been looking at float and height problems but cannot seem to solve it. Also, the most strange part is that if you wait a while after loading, the layout "fixes itself". Help! The url is the following (without the spaces, sorry) w w w . r e - c r e a r t . c o m Edit: update, it sounds crazy, but if you press control and use the mouse wheel (as if you were zooming in /out in a modern browser, although ie6 doesnt do that) the layout fixes as well. Please help, I am going crazy.

    Read the article

  • Strange result of highchart

    - by user1612334
    I use http://highcharts.com and there is really strange result. So, my data looks like: Value | Date 1507 2013-02-03 734 2013-02-02 0 2013-02-01 225 2013-01-31 *Graphic miss* 672 2013-01-30 *Graphic miss* 692 2013-01-29 *Graphic miss* <--- This value gone to 1 february 910 2013-01-28 314 2013-01-27 I miss three days (29 January, 30, 31). When i get data from database, i convert it so: var lines = []; try { jQuery.each(data, function(i, line) { var dateArr = line.date.split('-'); lines.push([ Date.UTC(dateArr[0],dateArr[1],dateArr[2]), parseInt(line.num_chips) ]); }); } catch(e) { } Why could it be so? =\

    Read the article

  • c++: strange syntax in what() method of std::exception

    - by Patrick Oscity
    When i am inheriting from std::exception in order to define my own exception type, i need to override the what() method, which has the following signature: virtual const char* what() const throw(); This definitely looks strange to me, like if there were two method names in the signature. Is this some very specific syntax, like with pure virtual methods, e.g.: virtual int method() const = 0; or is this a feature, that could somehow be used in another context, too? And if so, for what could it be used?

    Read the article

  • ondevicemotion in Chrome desktop returns true

    - by Martin Klasson
    I am using a "shake" function from github - and it has a detection that is browser-based javascript. //feature detect this.hasDeviceMotion = 'ondevicemotion' in window; This though yields true even on Chrome on OS X. It feels strange, since I am not willing to shake my monitor on my desktop. Safari on OS X gives me "false" in return when testing. I have searched but not been able to find out why Chrome decided to take this path. It bugs me. Is there a better way to make this detection? Not all "mobile devices" has shake as well.. or does not let the browser have that capability, as it does not seem to work in windows phones.

    Read the article

  • Strange calculation problem in C multiply by 1.2 fails

    - by DoomStone
    I have this c code, where i need to calculate a dobule from a long. double result; long t2_value; t2_value = 72; result = t2_value * 1.2; Now this code crashes at "result = t2_value * 1.2;" only with the error "Vector 0000000006". Here is the strange thing, if i replace result = t2_value * 1.2; with result = 72 * 1.2; evything works just as it should, i have tryed type casting t2_value as an double result = ((double)t2_value * 1.2); or making it an int istead of a long, but nothing helps.

    Read the article

  • A strange bug, is Mysql asynchronous?

    - by Farf
    Hello, I have a strange bug. I launch a PHP Unit test Suite. At the beginning, it executes a big query to initialize the database. If I put a breakpoint just after the execution of the sql, there is no problem and my tests pass. If I don't put any break point, they don't pass and say that the tables don't exist! It works as if the sql query was asynchronous! Do you have an idea of the bug? Or how to debug that? Thanks a lot in advance for your help, I'm lost! Farf

    Read the article

  • strange behavior while including a class in php

    - by user1864539
    I'm experiencing a strange behavior with PHP. Basically I want to require a class within a PHP script. I know it is straight forward and I did it before but when I do so, it change the behavior of my jquery (1.8.3) ajax response. I'm running a wamp setup and my PHP version is 5.4.6. Here is a sample as for my index.html head (omitting the jquery js include) <script> $(document).ready(function(){ $('#submit').click(function(){ var action = $('#form').attr('action'); var form_data = { fname: $('#fname').val(), lname: $('#lname').val(), phone: $('#phone').val(), email: $('#email').val(), is_ajax: 1 }; $.ajax({ type: $('#form').attr('method'), url: action, data: form_data, success: function(response){ switch(response){ case 'ok': var msg = 'data saved'; break; case 'ko': var msg = 'Oops something wrong happen'; break; default: var msg = 'misc:<br/>'+response; break; } $('#message').html(msg); } }); return false; }); }); </script> body <div id="message"></div> <form id="form" action="handler.php" method="post"> <p> <input type="text" name="fname" id="fname" placeholder="fname"> <input type="text" name="lname" id="lname" placeholder="lname"> </p> <p> <input type="text" name="phone" id="phone" placeholder="phone"> <input type="text" name="email" id="email" placeholder="email"> </p> <input type="submit" name="submit" value="submit" id="submit"> </form> And as for the handler.php file: <?php require('class/Container.php'); $filename = 'xml/memory.xml'; $is_ajax = $_REQUEST['is_ajax']; if(isset($is_ajax) && $is_ajax){ $fname = $_REQUEST['fname']; $lname = $_REQUEST['lname']; $phone = $_REQUEST['phone']; $email = $_REQUEST['email']; $obj = new Container; $obj->insertData('fname',$fname); $obj->insertData('lname',$lname); $obj->insertData('phone',$phone); $obj->insertData('email',$email); $tmp = $obj->give(); $result = $tmp['_obj']; /* Push data inside array */ $array = array(); foreach($result as $key => $value){ array_push($array,$key,$value); } $xml = simplexml_load_file($filename); // check if there is any data in if(count($xml->elements->data) == 0){ // if not, create the structure $xml->elements->addChild('data',''); } // proceed now that we do have the structure if(count($xml->elements->data) == 1){ foreach($result as $key => $value){ $xml->elements->data->addChild($key,$value); } $xml->saveXML($filename); echo 'ok'; }else{ echo 'ko'; } } ? The Container class: <?php class Container{ private $_obj; public function __construct(){ $this->_obj = array(); } public function addData($data = array()){ if(!empty($data)){ $oldData = $this->_obj; $data = array_merge($oldData,$data); $this->_obj = $data; } } public function removeData($key){ if(!empty($key)){ $oldData = $this->_obj; unset($oldData[$key]); $this->_obj = $oldData; } } public function outputData(){ return $this->_obj; } public function give(){ return get_object_vars($this); } public function insertData($key,$value){ $this->_obj[$key] = $value; } } ? The strange thing is that my result always fall under the default switch statement and the ajax response fit both present statement. I noticed then if I just paste the Container class on the top of the handler.php file, everything works properly but it kind of defeat what I try to achieve. I tried different way to include the Container class but it seem to be than the issue is specific to this current scenario. I'm still learning PHP and my guess is that I'm missing something really basic. I also search on stackoverflow regarding the issue I'm experiencing as well as PHP.net, without success. Regards,

    Read the article

  • strange bug - how to pause a java program?

    - by TerraNova993
    I'm trying to: display a text in a jLabel, wait for two seconds, then write a new text in the jLabel this should be simple, but I get a strange bug: the first text is never written, the application just waits for 2 seconds and then displays the final text. here is the example code: private void testButtonActionPerformed(java.awt.event.ActionEvent evt) { displayLabel.setText("Clicked!"); // first method with System timer /* long t0= System.currentTimeMillis(); long t1= System.currentTimeMillis(); do{ t1 = System.currentTimeMillis(); } while ((t1 - t0) < (2000)); */ // second method with thread.sleep() try { Thread.currentThread().sleep(2000); } catch (InterruptedException e) {} displayLabel.setText("STOP"); } with this code, the text "Clicked!" is never displayed. I just get a 2 seconds - pause and then the "STOP" text. I tried to use System timer with a loop, or Thread.sleep(), but both methods give the same result.

    Read the article

  • Strange python error

    - by Werner
    Hi, I am trying to write a python program that calculates a histogram, given a list of numbers like: 1 3 2 3 4 5 3.2 4 2 2 so the input parameters are the filename and the number of intervals. The program code is: #!/usr/bin/env python import os, sys, re, string, array, math import numpy Lista = [] db = sys.argv[1] db_file = open(db,"r") ic=0 nintervals= int(sys.argv[2]) while 1: line = db_file.readline() if not line: break ll=string.split(line) #print ll[6] Lista.insert(ic,float(ll[0])) ic=ic+1 lmin=min(Lista) print "min= ",lmin lmax=max(Lista) print "max= ",lmax width=666.666 width=(lmax-lmin)/nintervals print "width= ",width nelements=len(Lista) print "nelements= ",nelements print " " Histogram = numpy.zeros(shape=(nintervals)) for item in Lista: #print item int_number = 1 + int((item-lmin)/width) print " " print "item,lmin= ",item,lmin print "(item-lmin)/width= ",(item-lmin)," / ",width," ====== ",(float(item)-float(lmin))/float(width) print "int((item-lmin)/width)= ",int((item-lmin)/width) print item , " belongs to interval ", int_number, " which is from ", lmin+width*(int_number-1), " to ",lmin+width*int_number Histogram[int_number] = Histogram[int_number] + 1 4 but somehow I am completely lost, I get strange errors, can anybody help¿ Thanks

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >