Search Results

Search found 6374 results on 255 pages for 'double underscore'.

Page 14/255 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • javascript turn single line break to double line break

    - by Eric Sim
    Hm... I'm trying to convert single line break into double line break, as in This is a sentence. This is another sentence. into This is a sentence. This is another sentence. Apparently this doesn't work ThisContent = ThisContent.replace(/(\n)/gm, "\n\n"); since it replace everything, including double line breaks. What's the regex to do this?

    Read the article

  • Numerical precision of double type in Visual C++ 2008 Express debugger

    - by damik
    I'm using Visual C++ 2008 Express Edition and when i debug code: double x = 0.2; I see in debugging tooltip on x 0.20000000000000001 but: typedef numeric_limits< double > double_limit; int a = double_limit::digits10 gives me: a = 15 Why results in debugger are longer than maybe ? What is this strange precision based on ? My CPU is Intel Core 2 Duo T7100

    Read the article

  • Merging code with dependencies? - Javascript

    - by RadiantHex
    Hi folks, this might be quite simple, but I must say I'm a bit confused on this topic. I'm writing code based on two popular libraries: jQuery underscore.js I am just wondering what would be the best way to isolate the code and prevent conflicts and how to merge it with its dependencies. By merging I mean putting them within the same file. :) I hope I'm not asking something which is too basic. ...and a last thing MERRY CHRISTMAS EVERYONE! =D

    Read the article

  • Extend precision of MySQL's double datatype?

    - by tim82
    I am trying to save the value "6.714285714285714" into a DOUBLE datatype field. Unfortunately it does not fit at all and is cutted by one char. Storing larger numbers becomes less precise. Already searched in the mysql manual and it seems to be that double is the most precise data type available. Anyone knows a practicable workaround? Sorry for my bad english and thx a lot!

    Read the article

  • How to use double buffering inside a thread and applet

    - by russell
    I have a question about when paint and update method is called?? i have game applet where i want to use double buffering.But i cant use it.the problem is In my game there is a ball which is moving inside run() method.I want to know how to use double buffering to swap the offscreen image and current image.Someone plz help. And when there is both update() and paint() method.which are called first,when and why ???

    Read the article

  • Problem in converting ToDictionary<Datetime,double>() using LINQ(C#3.0)

    - by Newbie
    I have written the below return (from p in returnObject.Portfolios.ToList() from childData in p.ChildData.ToList() from retuns in p.Returns.ToList() select new Dictionary<DateTime, double> () { p.EndDate, retuns.Value } ).ToDictionary<DateTime,double>(); Getting error No overload for method 'Add' takes '1' arguments Where I am making the mistake I am using C#3.0 Thanks

    Read the article

  • roundoff double values in Java

    - by S.PRATHIBA
    Hi all, I have a matrix.I found the 10th power of matrix using Java.After finding the 10th power,I need to round off the double values to 3 decimal places.Please help me to round off the double values in the matrix to 3 decimal places.

    Read the article

  • Python: inserting double or single quotes around a string

    - by Jessy
    Im using python to access a MySQL database and im getting a unknown column in field due to quotes not being around the variable. code below: cur = x.cnx.cursor() cur.execute('insert into tempPDBcode (PDBcode) values (%s);' % (s)) rows = cur.fetchall() How do i manually insert double or single quotes around the value of s? I've trying using str() and manually concatenating quotes around s but it still doesn't work. The sql statement works fine iv double and triple check my sql query.

    Read the article

  • strange parsing Double behaviour...

    - by Cristian Boariu
    Hi, I have this line of code: return (this.pretWithoutDiscount / Double.Parse(UtilsStatic.getEuroValue())).ToString("N2") + "€"; In debug mode i've tested and the values are: UtilsStatic.getEuroValue() = "4.1878" this.pretWithoutDiscount = 111.0 Can anyone explaing WHY: Double.Parse(UtilsStatic.getEuroValue()) = 41878.0 when it should be 4.1878 ?? Thanks... PS: UtilsStatic.getEuroValue returns a string.

    Read the article

  • double border with no space in between

    - by user330239
    Hi guys, i wanted to make a double border but with no space in between and the double border should be of different color. I tried using image instead but i thought css could probably perform this job for me, i searched the net but hardly find anything close. What i wanted is total of 2px dotted border with top color of #a4a4a4 and bottom color of #474747. Any idea how i can do this instead of creating 2 divs?

    Read the article

  • client generated double submit cookie, cross site request forgery prevention

    - by james
    in a double-submitted cookie csrf prevention scheme, is it necessary for the server to provide the cookie? it seems i could have javascript on the clients page generate and set a cookie "anti_csrf", then double submit that (once as a cookie, done by the browser, and once in the body of the request). a foreign domain would not be able to read or write the "anti_csrf" cookie to include it in the body of a request. is this secure, or am i overlooking something?

    Read the article

  • template; Point<2, double>; Point<3, double>

    - by Oops
    Hi, I want to create my own Point struct it is only for purposes of learning C++. I have the following code: template <int dims, typename T> struct Point { T X[dims]; Point(){} Point( T X0, T X1 ) { X[0] = X0; X[1] = X1; } Point( T X0, T X1, T X2 ) { X[0] = X0; X[1] = X1; X[2] = X2; } Point<dims, int> toint() { //how to distinguish between 2D and 3D ??? Point<dims, int> ret = Point<dims, int>( (int)X[0], (int)X[1]); return ret; } std::string str(){ //how to distinguish between 2D and 3D ??? std::stringstream s; s << "{ X0: " << X[0] << " | X1: " << X[1] << " }"; return s.str(); } }; int main(void) { Point<2, double> p2d = Point<2, double>( 12.3, 45.6 ); Point<3, double> p3d = Point<3, double>( 12.3, 45.6, 78.9 ); Point<2, int> p2i = p2d.toint(); //OK Point<3, int> p3i = p3d.toint(); //m??? std::cout << p2d.str() << std::endl; //OK std::cout << p3d.str() << std::endl; //m??? std::cout << p2i.str() << std::endl; //m??? std::cout << p3i.str() << std::endl; //m??? char c; std::cin >> c; return 0; } of couse until now the output is not what I want. my questions is: how to take care of the dimensions of the Point (2D or 3D) in member functions of the Point? many thanks in advance Oops

    Read the article

  • Problem in converting ToDictionary<Datetime,double>() usinh LINQ(C#3.0)

    - by Newbie
    I have written the below return (from p in returnObject.Portfolios.ToList() from childData in p.ChildData.ToList() from retuns in p.Returns.ToList() select new Dictionary<DateTime, double> () {p.EndDate, retuns.Value }).ToDictionary<DateTime,double>(); Getting error No overload for method 'Add' takes '1' arguments Where I am making the mistake I am using C#3.0 Thanks

    Read the article

  • Python and C++ Sockets converting packet data

    - by yeus
    First of all, to clarify my goal: There exist two programs written in C in our laboratory. I am working on a Proxy Server (bidirectional) for them (which will also mainpulate the data). And I want to write that proxy server in Python. It is important to know that I know close to nothing about these two programs, I only know the definition file of the packets. Now: assuming a packet definition in one of the C++ programs reads like this: unsigned char Packet[0x32]; // Packet[Length] int z=0; Packet[0]=0x00; // Spare Packet[1]=0x32; // Length Packet[2]=0x01; // Source Packet[3]=0x02; // Destination Packet[4]=0x01; // ID Packet[5]=0x00; // Spare for(z=0;z<=24;z+=8) { Packet[9-z/8]=((int)(720000+armcontrolpacket->dof0_rot*1000)/(int)pow((double)2,(double)z)); Packet[13-z/8]=((int)(720000+armcontrolpacket->dof0_speed*1000)/(int)pow((double)2,(double)z)); Packet[17-z/8]=((int)(720000+armcontrolpacket->dof1_rot*1000)/(int)pow((double)2,(double)z)); Packet[21-z/8]=((int)(720000+armcontrolpacket->dof1_speed*1000)/(int)pow((double)2,(double)z)); Packet[25-z/8]=((int)(720000+armcontrolpacket->dof2_rot*1000)/(int)pow((double)2,(double)z)); Packet[29-z/8]=((int)(720000+armcontrolpacket->dof2_speed*1000)/(int)pow((double)2,(double)z)); Packet[33-z/8]=((int)(720000+armcontrolpacket->dof3_rot*1000)/(int)pow((double)2,(double)z)); Packet[37-z/8]=((int)(720000+armcontrolpacket->dof3_speed*1000)/(int)pow((double)2,(double)z)); Packet[41-z/8]=((int)(720000+armcontrolpacket->dof4_rot*1000)/(int)pow((double)2,(double)z)); Packet[45-z/8]=((int)(720000+armcontrolpacket->dof4_speed*1000)/(int)pow((double)2,(double)z)); Packet[49-z/8]=((int)armcontrolpacket->timestamp/(int)pow(2.0,(double)z)); } if(SendPacket(sock,(char*)&Packet,sizeof(Packet))) return 1; return 0; What would be the easiest way to receive that data, convert it into a readable python format, manipulate them and send them forward to the receiver?

    Read the article

  • Windows 2008 R2 remote desktop - Double Login

    - by Zulgrib
    After an Active Directory fail RDP connection started to ask for credentials twice (once on local RDP program, second time on remote's logon screen) I already looked at Windows 2008 R2 RDS - Double Login Solution provided there doesn't work for me. The server is alone, without AD/DNS services, RDP service isn't installed I tried every security settings on RDP-Tcp (RDP, Negotiate, SLL) Logon option is set to "Use credentials from the client" Both windows client and server use RDP 7.1 fPromptForPassword regitries are set to 0 Local Computer Policy\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Security\Always prompt for password upon connection is set to "Disabled" Why i am sure the problem comes from the server and not the client ? This problem affected a 3rd RDP program on Android too (it was directly showing "preparing desktop previously, on both MS RDP and the 3rd program) No bakcup are available (Else the Active Directory wouldn't be a fail, but just a lose of time) I am wondering if a rule linked to RDP got changed after the AD install+unistall, but i'm unable to find where. While this is not a critic problem, this is very annoying. I don't know if more information are needed, if it's the case and if you are patient enough, please tell me what is missing and i'll edit this post to add the missing informations.

    Read the article

  • Windows Displays Double the Actual Installed Physical Memory

    - by Andrew Barber
    I have a server I've installed Windows Web 2008 R2 on, which is reporting that I have double the physical memory installed as is actually the case. In msinfo32 "Installed Physical Memory" shows as 2x what ever the actual installed amount is, though "Total Physical Memory" shows the correct amount. The "System" info window shows installed memory as 2x, with the correct amount in parenthesis listed as the "usable" amount). This server mistakenly had Windows Web 2008 (32-bit) installed on it just previously, and that OS also reported the same faulty information as Win2K8R2 is reporting. BIOS reports the correct amount, memtest was run on this server before installation, and a previous Windows 2000 instance installed on this system also reported the correct amount, as I recall. Server operation seems to be fine as well (it's only trying to use the correct amount of memory). The server is a generic pizzabox running on a SuperMicro X6DVL-EG with dual Xeon-3.2's. Memory installed are 4 matching mt18vddf12872g-335c3 sticks (1GB pc2700 DDR ECC REG cl2.5) This behavior occurs whether two or all four are installed. So, has anyone seen something like this before? Have any idea about what's causing it, and how I should be concerned about it? Everything else seems good so far, and I'll be upgrading the memory before putting the server into service, but I don't want to spend too much time/money/effort on the server if it's got something odd going wrong here. UPDATE: There was a question I ran into regarding memory sparing in the BIOS and a possible (buggy) effect thereof; however, flipping that bit back and forth in the BIOS revealed that isn't the issue. Still flummoxed a bit about this one, though I still have seen no negative impacts. Post-Answer Update (January 13, 2011): Upgrading the system with new, larger memory has fixed this issue.

    Read the article

  • How to revert to Eclipse's old behavior when double-clicking on frames or windows, in Juno?

    - by mattquiros
    I find Eclipse Juno very counter-intuitive. In my workspace, I used to just have the package view at the left, my code on the right, and whenever I'm printing something in the console, that's only when the console frame shows up from the bottom right. When you double click on a particular window, it either only goes fullscreen within Eclipse, or back to its original size together with the size of the other frames. In Juno, however, it seems that frames are put on layers on top of each other. When I print something to the console, the output frame only shows up as a small, useless square to my right. When I double-click, it goes full screen. When I double-click again, it occupies the full right frame, hiding my code. I double-click again and it goes full screen, then it double-clicks before it shares the right frame with my code on top of it. Then when I minimize it, it goes to the side. Any way to go back to the good old days of Eclipse? Thanks.

    Read the article

  • Floating Point Arithmetic - Modulo Operator on Double Type

    - by CrimsonX
    So I'm trying to figure out why the modulo operator is returning such a large unusual value. If I have the code: double result = 1.0d % 0.1d; it will give a result of 0.09999999999999995. I would expect a value of 0 Note this problem doesn't exist using the dividing operator - double result = 1.0d / 0.1d; will give a result of 10.0, meaning that the remainder should be 0. Let me be clear: I'm not surprised that an error exists, I'm surprised that the error is so darn large compared to the numbers at play. 0.0999 ~= 0.1 and 0.1 is on the same order of magnitude as 0.1d and only one order of magnitude away from 1.0d. Its not like you can compare it to a double.epsilon, or say "its equal if its < 0.00001 difference". I've read up on this topic on StackOverflow, in the following posts one two three, amongst others. Can anyone suggest explain why this error is so large? Any any suggestions to avoid running into the problems in the future (I know I could use decimal instead but I'm concerned about the performance of that).

    Read the article

  • Double null-terminated string

    - by wengseng
    I need to format a string to be double null-terminated string in order to use SHFileOperation. Interesting part is i found one of the following working, but not both: // Example 1 CString szDir(_T("D:\\Test")); szDir = szDir + _T('\0') + _T('\0'); // Example 2 CString szDir(_T("D:\\Test")); szDir = szDir + _T("\0\0"); //Delete folder SHFILEOPSTRUCT fileop; fileop.hwnd = NULL; // no status display fileop.wFunc = FO_DELETE; // delete operation fileop.pFrom = szDir; // source file name as double null terminated string fileop.pTo = NULL; // no destination needed fileop.fFlags = FOF_NOCONFIRMATION|FOF_SILENT; // do not prompt the user fileop.fAnyOperationsAborted = FALSE; fileop.lpszProgressTitle = NULL; fileop.hNameMappings = NULL; int ret = SHFileOperation(&fileop); Does anyone has idea on this? Is there other way to append double-terminated string?

    Read the article

  • KSH: Variables containing double quotes

    - by nitrobass24
    I have a string called STRING1 that could contain double quotes. I am echoing the string through sed to pull out puntuation then sending to array to count certain words. The problem is I cannot echo variables through double quotes to sed. I am crawling our filesystems looking for files that use FTP commands. I grep each file for "FTP" STRING1=`grep -i ftp $filename` If you echo $STRING1 this is the output (just one example) myserver> echo "Your file `basename $1` is too large to e-mail. You must ftp the file to BMC tech support. \c" echo "Then, ftp it to ftp.bmc.com with the user name 'anonymous.' \c" echo "When the ftp is successful, notify technical support by phone (800-537-1813) or by e-mail ([email protected].)" Then I have this code STRING2=`echo $STRING1|sed 's/[^a-zA-Z0-9]/ /g'` I have tried double quoting $STRING1 like STRING2=`echo "$STRING1"|sed 's/[^a-zA-Z0-9]/ /g'` But that does not work. Single Qoutes, just sends $STRING1 as the string to sed...so that did not work. What else can I do here?

    Read the article

  • java hashmap array to double array

    - by Tweety
    Hi, I declared LinkedHashMap<String, float[]> and now I want to convert float[] values into double[][]. I am using following code. LinkedHashMap<String, float[]> fData; double data[][] = null; Iterator<String> iter = fData.keySet().iterator(); int i = 0; while (iter.hasNext()) { faName = iter.next(); tValue = fData.get(faName); //data = new double[fData.size()][tValue.length]; for (int j = 0; j < tValue.length; j++) { data[i][j] = tValue[j]; } i++; } When I try to print data System.out.println(Arrays.deepToString(data)); it doesn't show the data :( I tried to debug my code and i figured out that I have to initialize data outside the while loop but then I don't know the array dimensions :( How to solve it? Thanks

    Read the article

  • Double Layer DVD+R burning problem - I/O Error

    - by Mehper C. Palavuzlar
    I have a modern PC (Quad Core CPU, 4 GB RAM, Win7 Home Premium 64-bit) but I have a problem with burning .dvd images to Double Layer (8.5 GB) DVDs. I wasted too many DVD+R DL discs but to no avail. Here is a short explanation of what I did: I'm using ImgBurn v2.5.0.0 (latest version). I'm trying to burn an image file (.dvd) which is together with the related .iso file in the same folder. In ImgBurn, I select the file with .dvd extension, and set writing speed to 2.4x. Burning process starts normally, but around 7% of the process, it gives a I/O Write Error, which is as follows: I wasted 3 discs (Magic, Made in Taiwan, DVD+R DL, 8.5 GB) trying the same thing. My DVD writer is LG GH22NP20 with IDE connection type. I updated its firmware from 1.04 to 2.00 but no success in burning again. Then my cousin brought his LG (an older model) which, he claims, was successful in writing DL discs with the same brand (Magic). I plugged off my LG and plugged the older one in, and tried to burn the image again. It also gave an I/O Error even without standing till 7%. I tried another burning program (CloneCD), but failed again. Then I bought other brands (TDK and VERBATIM) and tried to burn the image. Burning process started successfully, but around 14% (for Verbatim) and 25% (for TDK) failed again. Here is a screeny from ImgBurn: I've burned lots of 4.7 GB DVD+Rs and DVD-Rs successfully, even without a single error, with this LG DVD writer, but this case is very bothering for me. What should I do? Should I buy a new DVD writer other than LG? Could this be related to Windows or my hardware configuration? Thanks for your help. Edit: My burner works on my cousin's machine. So the problem must be related to my system. What could be the reason? Latest news: I borrowed an external USB DVD writer from a friend, which is PHILIPS SPD3000CC (an old model). Guess what! It's burning DVD+R DLs successfully! How come an internal DVD writer of a brand new computer system cannot burn DL DVDs? Now I'm considering buying a new internal DVD writer with not IDE, but SATA connection...

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >