Search Results

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

Page 186/255 | < Previous Page | 182 183 184 185 186 187 188 189 190 191 192 193  | Next Page >

  • How can I make external script output link to code in Visual Studio?

    - by JoelFan
    I sometimes need to search code for patterns in a way that goes beyond the regex capabilities of Visual Studio (e.g. patterns that depend on what was seen previously in the file or on the contents of other files). So I use Perl to analyze the source and output matching lines, along with the file name and line number. Since this is the exact same format as is produced by the search feature of Visual Studio, I wonder if there is a way to duplicate the functionality where I can double-click on a line and it will display that line in context in Visual Studio. Any ideas?

    Read the article

  • Printing escape character

    - by danutenshu
    When I am given "d""\"/""b", I need to print out the statement character for character. (d, b, a slash, a backslash, and 5 quotes) in C++. The only errors that show now are the lines if(i.at(j)="\\") and else if(i.at(j)="\""). Also, how should the outside double apostrophes be excluded? #include <iostream> #include <cstdlib> using namespace std; int main (int argc, const char* argv[] ) { string i= argv[1]; for (int j=0; j>=sizeof(i)-1; j++) { if(i.at(j)="\\") { cout << "\\"; } else if(i.at(j)="\"") { cout << "\""; } else { cout << i.at(j); } } return 0; }

    Read the article

  • a newbie gcc compiler and c language question

    - by dydx
    Hi, when I'm trying to compile my c program it gives me this error warning: integer constant is too large for 'long' type which refers to these lines int barcode, a, b, c; scanf("%d", &barcode); a = barcode / 1000000000000; b = barcode / 100000000000 % 10; c = barcode / 10000000000 % 10; and the rest is fine. I know I'm not supposed to use int for such a large number, any suggestions on what I should use? if I replace int with double what should the '%d' part be replaced with then?

    Read the article

  • deleting dynamically allocated object that contains vector in C++ STL

    - by kobac
    I have a class class ChartLine{ protected: vector<Point> line; // points connecting the line CString name; //line name for legend CPen pen; //color, size and style properties of the line }; where Point is a structure struct Point{ CString x; double y; }; In main() I dynamically allocate objects of type ChartLine with new operator. If I use delete afterwards, will default destructor ~ChartLine() properly dealocate (or clear) member ChartLine::line(which is vector btw) or I would have to clear that vector in ~ChartLine() manually? Thanks in advance. Cheers.

    Read the article

  • How to add style to parent <li> item if child <ul> exists?

    - by user1292760
    I'm trying to make a menu in advance to be seen whether there is a double nesting. <ul class="parent"> <li class="child"></li> <li class="child"> <ul slass="nesting"> <li></li> <li></li> </ul> </li> <li class="child"></li> </ul> So ul class="nesting" hidden by default but appears during the hover of li class="child". I want to make another design on the li class="child" which have a nested ul. Another words how can i show nesting before hover by the means of Javascript/JQuery? Thnaks in advance!

    Read the article

  • The type initializer for {Data.DataModule} threw an exception.

    - by squirms
    In visual basic, when in the "frmMain Events: Load", I get the following error The type initializer for 'projData.projDataModule' threw an exception. when running the code: var = 180 "var" is defined in projDataModule as Module projDataModule Public var As Double End Module When I rebuild the solution, It says "0 errors, 0 warnings" and will actually compile, however the Error list shows the following error: Error 1 Custom tool error: Failed to generate file: There is an error in XML document (1, 1). I:\Documents and Settings\Bill\Desktop\Projects\Data\My Project\Application.myapp 1 1 Data Any ideas or help at all would be greatly appreciated. Thanks in advance.

    Read the article

  • To Switch To The Design View Of A Windows Form

    - by June
    Hi Friends I create new project in Windows Form Application using Visual Studio in VB.Net. I place some controls on my form. I don't write any code at this time. I close this project. When i open this project again , i found Form1.vb. I double-click that file , but the design view doesn't appear. I also find Form1.Designer.vb. What in this file is code. How can i switch to Design View of Form1 ? I need to write some codes for that form's objects like Button Click Event. June

    Read the article

  • Force freeing memory in PHP

    - by DBa
    Hi everybody, in a PHP program, I sequentially read a bunch of files (with file_get_contents), gzdecode them, json_decode the result, analyze the contents, throw the most of it away, and store about 1% in an array. Unfortunately, with each iteration (I traverse over an array containing the filenames), there seems to be some memory lost (according to memory_get_peak_usage, about 2-10 MB each time). I have double- and triplechecked my code, I am not storing unneded data in the loop (and the needed data hardly exceeds about 10MB overall), but I am frequently rewriting (actually, strings in an array). Apparently, PHP does not free the memory correctly, thus using more and more RAM until it hits the limit. Is there any way to do a forced garbage collection? Or, at least, to find out where the memory is used? Thanks in advance, Dmitri

    Read the article

  • inheritance from the django user model results in error when changing password

    - by Jerome
    I inherited form the django user model like so: from django.db import models from django.contrib.auth.models import User, UserManager from django.utils.translation import ugettext_lazy as _ class NewUserModel(User): custom_field_1 = models.CharField(_('custom field 1'), max_length=250, null=True, blank=True) custom_field_2 = models.CharField(_('custom field 2'), max_length=250, null=True, blank=True) objects = UserManager() When i go to the admin and add an entry into this model, it saves fine, but below the "Password" field where it has this text "Use '[algo]$[salt]$[hexdigest]' or use the change password form.", if i click on the "change password form' link, it produces this error Truncated incorrect DOUBLE value: '7/password' What can i do to fix this?

    Read the article

  • Adding index key in Grails' Domain

    - by firnnauriel
    I tried following this reference and this is now my domain's code: class SnbrActVector { long nid String term double weight static mapping = { version false nid index:'Nid_Idx' } static constraints = { term(blank:false) } } What I want is to do is to add an index key for 'nid' column. I dropped the existing table and run the app again so the table is then recreated. However, when i check for list of indices, I can't see a 'Nid_Idx', only available is 'PRIMARY'. Do I have to manually create the index and name it 'Nid_idx in my mysql database? Thanks.

    Read the article

  • Replace strings differently depending if is enclosed in braces or not.

    - by peroyomas
    I want to replace all instances of an specific words between braces with something else, unless it is written between double braces, while it should show as is it was written with single braces without the filter. I have tried a code but only works for the first match. The rest are shown depending of the first one: $foo = 'a {bar} b {{bar}} c {bar} d'; $baz = 'Chile'; preg_match_all( '/(\{?)\{(tin)\}(\}?)/i', $foo, $matches, PREG_SET_ORDER ); if ( !empty($matches) ) { foreach ( (array) $matches as $match ) { if( empty($match[1]) && empty($match[3])) { $tull = str_replace( $match[0], $baz, $foo ); } else { $tull = str_replace( $match[0], substr($match[0], 1, -1), $foo ) ; } } } echo $tull;

    Read the article

  • Change the image height and width based on the scale?

    - by user281947
    I want to resize the image height and width after setting its scale, below is what i am doing : <Image x:Name="img" Source="sii.PNG" > <Image.RenderTransform> <ScaleTransform x:Name="scale" /> </Image.RenderTransform> </Image> below is the cs code : void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) { scale.ScaleX = scale.ScaleY =e.NewValue; //here i have to change the height and width of an image }

    Read the article

  • excluding a column in csv file with regex

    - by JPro
    Is there any way to exclude/delete/replace one field from a csv file with some regexp in notepad++? I have a csv file with some data like this: '1','data1','data2','data3','data4','data5','data6','data7','data8','data9', 'data10','data11','data12','data13','data14','data15','data16','data17','data18', 'data19','data20','data21','data22','data23','\'data24 with some commas, here and there and some "double quotes", and fullstops.','data25','data26' The only problem I am facing is with data24 WHERE I encounter \' and then "" and some wild characters like , and .. This is particularly fixed at 24 field. For the purpose of clarity, I have entered a newline here. But the entire text above is in juts one line. Any ideas on how to solve? Thanks.

    Read the article

  • Generate custom marker (icon) out of two images in Leaflet

    - by Rmatt
    In Javascript/CoffeeScript, using Leaflet to display a map, I would like to have custom markers out of a two custom images, and also featuring a shadow for the pin : I want to have a "background" image with a color (or shape) to identify the category On top, I want to have inside this image a specific image (logo) for each pin I didn't find out how I could do that... Setting one image is quite easy but I don't know how to overlay them. I could also consider using a tool to superpose/group/overlay these images (locally ?) before in order to send only one to the Icon Leaflet Class, but also there, I wouldn't know which tool to use. Nevertheless, I still think that a double overlay would be more efficient and that my case could be useful for several people.

    Read the article

  • Image-free, custom-styled search bar

    - by Jon
    I'm working with the designer and he sent me the following design for the search bar on our webpage: I'm very much against using images in webpage design unless completely necessary, so I'm hoping that I can recreate the whole search bar widget in CSS. I know how to do border-radius, gradients, box-shadows, etc, so that's not a problem. Question: Assuming CSS3 browser compatibility, how can I go about recreating the actual search button (the magnifying glass portion) with the double curved edge, and the slight drop shadow on the bottom left? Thoughts: My initial feeling was that the search button would be circular and free-standing, then overlap the search input div with a negative left-margin, but then I was unsure how I would get that drop shadow. Edit: I'm not completely opposed to using an image for the magnifying glass, but I've seen a similar icon created in CSS before. Would an image vs. pure CSS end up loading at the same speed, or should I do all I can do in pure CSS?

    Read the article

  • What are possible suffixes after variable name in VBA?

    - by archimed7592
    As I've already figured out, there is at least six of them: !@#$%&. Here is snip: Dim A!, B@, C#, D$, E%, F& Debug.Print "A! - " & TypeName(A) Debug.Print "B@ - " & TypeName(B) Debug.Print "C# - " & TypeName(C) Debug.Print "D$ - " & TypeName(D) Debug.Print "E% - " & TypeName(E) Debug.Print "F& - " & TypeName(F) Outputs A! - Single B@ - Currency C# - Double D$ - String E% - Integer F& - Long Where is documentation on this syntax sugar? What other possible suffixes are there? Is there one for Date?

    Read the article

  • How to open a selected file in android?

    - by Karthick
    In windows text files are displayed with notepad icon. When we double click the particular file it open’s the notepad and displays the file. Like that I need to open the file from the download folder in android. I have used the intent-filter for register my ics file’s mime type. When I select the file in the download folder it just opens my application only. At that time I need to open / read the selected file. How to do this? I am new to android Can anyone help me?

    Read the article

  • How do I run Eclipse using Oracle's new 1.7 JDK for the Mac?

    - by sanity
    I'm trying to get the new 1.7 JDK working with Eclipse (this is Oracle's official release). I don't mean just pointing Eclipse to it so you can use it in projects, this works fine, but actually making Eclipse run using the 1.7 JVM. I've moved the new JVM to the top of the list in Java Preferences, but Eclipse still starts with 1.6. If I disable 1.6 in Java Preferences I get a dialog immediately after I double-click on Eclipse saying "Failed to create the Java Virtual Machine". edit: I added the following to my eclipse.ini just before the -vmargs: -vm /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin/java Yet in the Eclipse installation details dialog I still see: java.runtime.version=1.6.0_31-b04-415-11M3646 edit 2: here are the contents of my eclipse.ini file: https://gist.github.com/2512578

    Read the article

  • Speedup C++ code

    - by Werner
    Hi, I am writing a C++ number crunching application, where the bottleneck is a function that has to calculate for double: template<class T> inline T sqr(const T& x){return x*x;} and another one that calculates Base dist2(const Point& p) const { return sqr(x-p.x) + sqr(y-p.y) + sqr(z-p.z); } These operations take 80% of the computation time. I wonder if you can suggest approaches to make it faster, even if there is some sort of accuracy loss Thanks

    Read the article

  • Why is this C or C++ macro not expanded by the preprocessor?

    - by Atul
    Can someone points me the problem in the code when compiled with gcc 4.1.0. #define X 10 int main() { double a = 1e-X; return 0; } I am getting error:Exponent has no digits. When i replace X with 10, it works fine. Also i checked with g++ -E command to see the file with preprocessors applied, it has not replaced X with 10. I was under the impression that preprocessor replaces every macro defined in the file with the replacement text with applying any intelligence. Am I wrong? I know this is a really silly question but I am confused and I would rather be silly than confused :). Any comments/suggestions.

    Read the article

  • A generic list of generics

    - by SnOrfus
    I'm trying to store a list of generic objects in a generic list, but I'm having difficulty declaring it. My object looks like: public class Field<T> { public string Name { get; set; } public string Description { get; set; } public T Value { get; set; } /* ... */ } I'd like to create a list of these. My problem is that each object in the list can have a separate type, so that the populated list could contain something like this: { Field<DateTime>, Field<int>, Field<double>, Field<DateTime> } So how do I declare that? List<Field<?>> (I'd like to stay as typesafe as possible, so I don't want to use an ArrayList).

    Read the article

  • Is there a way to get the current UIEvent being handled?

    - by not-
    I'm working in a class that is a delegate of another class; this other class is in a third-party library that I'd like to avoid changing if at all possible. The original class is handling a -touchesEnded event, and is delegating responsibility to me, but it doesn't pass the UIEvent itself to me. Is there a way to get a handle to the current event in progress? It's a double-tap handler, and all that is passed to me is the view being touched, and the point at which the touch occurred. I want to know exactly how many touches are involved in the event. Thanks! randy

    Read the article

  • How to build a LINQ query from text at runtime?

    - by Danvil
    I have a class A { public int X; public double Y; public string Z; // and more fields/properties ... }; and a List<A> data and can build a linq query like e.g. var q = from a in data where a.X > 20 select new {a.Y, a.Z}; Then dataGridView1.DataSource = q.ToList(); displays the selection in my DataGridView. Now the question, is it possible to build the query from a text the user has entered at runtime? Like var q = QueryFromText("from a in data where a.X > 20 select new {a.Y, a.Z}"); The point being, that the user (having programming skills) can dynamically and freely select the displayed data.

    Read the article

  • R looking for the wrong java version

    - by Veit
    Hi, I installed/uninstalled java jre/jdk now many times and finally installed the older version 1.6.0_17 which is now located at "C:\Program Files\Java\jre6\bin". Now after all if I call 'java -version' within R i can see that R is looking for Java at the old path which is now wrong. The question is: Why is R looking for Java at the wrong path even so the windows path is set correctly? There are no double entrys within the windows path as far as I can see and I restarted R as well as Windows more then once since then. Any Ideas where R takes the wrong path from? On windows shell: $set [..] OS=Windows_NT Path=C:\Program Files\Java\jre6\bin; [..] $ java -version java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) within R: $system("java -version") Error: could not open `C:\Program Files (x86)\Java\jre6\lib\i386\jvm.cfg'

    Read the article

  • Beginner Access VBA SQL INSERT Question

    - by Josh K
    Syntax question: I am using the code below to call a query in Access VBA strSQL = "INSERT INTO tblLoanDetails ([ServerName]) VALUES ('Test') WHERE [ID]=3" Call CurrentDb.Execute(strSQL) And i am getting a runtime error of "3067: Query must contain atleast one table or query." the insert statement string looks like this (Threw the var into a text box): INSERT INTO tblLoanDetails ([ServerName]) VALUES ('Test') WHERE [ID]=3 I also tried adding a semi-colon to the end but with no luck. I also double checked to make sure my table is called tblLoanDetails and my Column names are ServerName, and ID Appreciate any help.

    Read the article

< Previous Page | 182 183 184 185 186 187 188 189 190 191 192 193  | Next Page >