[Solved] Optimize parsing more and more…. in C# [closed]

There’s nothing more you can optimize there. And I doubt that THIS is the slowest place in your program. However your null-values are a bit odd. -999 for numbers? DateTime.Now for a DateTime? Are you sure that won’t cause problems in other code? Those are pretty normal values which means that other code won’t be … Read more

[Solved] C# Windows Form – access code [closed]

You can access the Control’s objects attributes by it’s name. For example: NumericUpDown1 <- It’s the name of your Control In your C# code you can access all of it’s attribtes and methods by puttin a period after it’s name: NumericUpDown1.Maximun = 100; NumericUpDown1.Width = 250; NumericUpDown1.Height = 10; etc. You can serach it by … Read more

[Solved] How do i only remove “http://” and “http://www”? [closed]

You should not just use str_replace and using regular expressions seem overkill as well. Keep it simple and test for the beginning of the strings and just use the substring of what you actually want: function trimUrl($url) { if (strpos($url, ‘http://www.’) === 0) { return substr($url, 11); } if (strpos($url, ‘http://’) === 0) { return … Read more

[Solved] Whats the difference between list and array? [closed]

From the list reference in cplusplus.com: Compared to other base standard sequence containers (array, vector and deque), lists perform generally better in inserting, extracting and moving elements in any position within the container for which an iterator has already been obtained, and therefore also in algorithms that make intensive use of these, like sorting algorithms. … Read more

[Solved] Why the nested ‘for’ loop is not working in the below program?

initialize b at the beginning of your code, and inside the loop: #include<stdio.h> #include<conio.h> void main() { int m,a,i,b=0; // initialize b printf(“Enter the number upto which the prime number is to be displayed:”); scanf(“%d”,&m); for(a=1;a<=m;a++) { for(i=1;i<=a;i++) { if(a%i==0) { b++; } } if(b==2) { printf(“\t%d”,a); } b=0; // re-initialize } getch(); } 5 … Read more

[Solved] Please check jQuery syntax [closed]

The code is syntactically wrong as you you have mixed up the function ending braces. Below is the syntactically manipulated code. Hope you find that helpful. jQuery(document).ready(function ($) { var sliderHeight = $(window).height()-$(‘.slider’).position().top; $(‘.slider’).css({ ‘height’: sliderHeight }); $(‘.landing-title’).css({ ‘top’: $(‘.slider’).height()/2 – $(‘.landing-title’).height()/2 }) ; }); $(window).resize(function(){ sliderHeight = $(window).height()-$(‘.slider’).position().top; $(‘.slider’).css({ ‘height’: sliderHeight }); $(‘.landing-title’).css({ ‘top’: … Read more

[Solved] HTML5 programming questions [closed]

why to choose PHP/ASP.NET over client side programming Server side rendering vs. client side rendering. Server side: great for SEO + static content. Client side: great for dynamic interactive apps. The lines are blurry however. Can I call typescript code from javascript code? Yes. TypeScript is compiled to JavaScript and can be used from JavaScript. … Read more

[Solved] Cropper: what is the meaning of ‘.selector’?

.selector is a jQuery property which should return the selector used when the object set was created. var selector = $(‘#container’).selector; //thing would be ‘#container’ This has been deprecated in jQuery 1.7, I would suggest that the author of the plugin be notified and that they stop using it. The .selector property was deprecated in … Read more

[Solved] Python & Strings/Loops help please [closed]

1- Using while loop i = len(full_name.split()) – 1 while(i >= 0): print full_name.split()[i] i = i-1 2- Slicing x = full_name.index(” “) new_string = full_name[x+1:] + ” ” + full_name[0:x] print new_string 3- Counting lower and upper lower = 0 upper = 0 for letter in full_name: if letter.islower(): lower = lower + 1 … Read more