Daily Archives

Articles indexed Sunday December 16 2012

Page 6/13 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • read integer from file and save it into array

    - by user1908123
    I have a file named plain.txt contain an integer for example 2500 I want to open this file and read the integer then compare it with another integer!! here I want to compare the value of plain text with K. how can I save the value of into another integer to compare?? int main(){ int c,k=2000; FILE *f; f=fopen("plain.txt", "r"); c=getc(f); while(c!=EOF){ putchar(c); c=getc(f); } fclose(f); return 0; }

    Read the article

  • Lotto program doesn't stop

    - by Naseyb Yaramis
    So I'm making a lotto game. You have to enter 6 lucky numbers and if they're the same as the lotto numbers then you win. Here is my code: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace OefeningExaam { class Program { static void Main(string[] args) { Random getal = new Random(); int[] lottotrekking = new int[6]; Console.WriteLine("Geef je geluksgetallen in <tussen 1 en 42>"); Console.WriteLine("Geef je eerste getal in"); int getal1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Geef je tweede getal in"); int getal2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Geef je derde getal in"); int getal3 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Geef je vierde getal in"); int getal4 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Geef je vijfde getal in"); int getal5 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Geef je zesde getal in"); int getal6 = Convert.ToInt32(Console.ReadLine()); while (getal1 != lottotrekking[0] || getal2 != lottotrekking[1] || getal3 != lottotrekking[2] || getal4 != lottotrekking[3] || getal5 != lottotrekking[4] || getal5 != lottotrekking[4] || getal6 != lottotrekking[5]) { for (int i = 0; i < lottotrekking.Length; i++) { int cijfer = getal.Next(1, 43); lottotrekking[i] = cijfer; Console.WriteLine(lottotrekking[0] + "\t " + lottotrekking[1] + "\t " + lottotrekking[2] + "\t " + lottotrekking[3] + "\t " + lottotrekking[4] + "\t " + lottotrekking[5]); } } if (getal1 == lottotrekking[0] && getal2 == lottotrekking[1] && getal3 == lottotrekking[2] && getal4 == lottotrekking[3] && getal5 == lottotrekking[4] && getal5 == lottotrekking[4] && getal6 == lottotrekking[5]) { Console.WriteLine(lottotrekking[0] + " " + lottotrekking[1] + " " + lottotrekking[2] + " " + lottotrekking[3] + " " + lottotrekking[4] + " " + lottotrekking[5]); } Console.ReadLine(); } } } The problem is that the program just keeps going and doesn't stop. It's supposed to stop when the lucky numbers are the same as the lotto numbers.

    Read the article

  • Why is str_replace not replacing this string?

    - by Niall
    I have the following PHP code which should load the data from a CSS file into a variable, search for the old body background colour, replace it with the colour from a submitted form, resave the CSS file and finally update the colour in the database. The problem is, str_replace does not appear to be replacing anything. Here is my PHP code (stored in "processors/save_program_settings.php"): <?php require("../security.php"); $institution_name = mysql_real_escape_string($_POST['institution_name']); $staff_role_title = mysql_real_escape_string($_POST['staff_role_title']); $program_location = mysql_real_escape_string($_POST['program_location']); $background_colour = mysql_real_escape_string($_POST['background_colour']); $bar_border_colour = mysql_real_escape_string($_POST['bar_border_colour']); $title_colour = mysql_real_escape_string($_POST['title_colour']); $url = $global_variables['program_location']; $data_background = mysql_query("SELECT * FROM sents_global_variables WHERE name='background_colour'") or die(mysql_error()); $background_output = mysql_fetch_array($data_background); $css = file_get_contents($url.'/default.css'); $str = "body { background-color: #".$background_output['data']."; }"; $str2 = "body { background-color: #".$background_colour."; }"; $css2 = str_replace($str, $str2, $css); unlink('../default.css'); file_put_contents('../default.css', $css2); mysql_query("UPDATE sents_global_variables SET data='{$institution_name}' WHERE name='institution_name'") or die(mysql_error()); mysql_query("UPDATE sents_global_variables SET data='{$staff_role_title}' WHERE name='role_title'") or die(mysql_error()); mysql_query("UPDATE sents_global_variables SET data='{$program_location}' WHERE name='program_location'") or die(mysql_error()); mysql_query("UPDATE sents_global_variables SET data='{$background_colour}' WHERE name='background_colour'") or die(mysql_error()); mysql_query("UPDATE sents_global_variables SET data='{$bar_border_colour}' WHERE name='bar_border_colour'") or die(mysql_error()); mysql_query("UPDATE sents_global_variables SET data='{$title_colour}' WHERE name='title_colour'") or die(mysql_error()); header('Location: '.$url.'/pages/start.php?message=program_settings_saved'); ?> Here is my CSS (stored in "default.css"): @charset "utf-8"; /* CSS Document */ body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000; } body { background-color: #CCCCFF; } .main_table th { background:#003399; font-size:24px; color:#FFFFFF; } .main_table { background:#FFF; border:#003399 solid 1px; } .subtitle { font-size:20px; } input#login_username, input#login_password { height:30px; width:300px; font-size:24px; } input#login_submit { height:30px; width:150px; font-size:16px; } .timetable_cell_lesson { width:100px; font-size:10px; } .timetable_cell_tutorial_a, .timetable_cell_tutorial_b, .timetable_cell_break, .timetable_cell_lunch { width:100px; background:#999; font-size:10px; } I've run some checks using the following code in the PHP file: echo $css . "<br><br>" . $str . "<br><br>" . $str2 . "<br><br>" . $css2; exit; And it outputs (as you can see it's not changing anything in the CSS): @charset "utf-8"; /* CSS Document */ body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000; } body { background-color: #CCCCFF; } .main_table th { background:#003399; font-size:24px; color:#FFFFFF; } .main_table { background:#FFF; border:#003399 solid 1px; } .subtitle { font-size:20px; } input#login_username, input#login_password { height:30px; width:300px; font-size:24px; } input#login_submit { height:30px; width:150px; font-size:16px; } .timetable_cell_lesson { width:100px; font-size:10px; } .timetable_cell_tutorial_a, .timetable_cell_tutorial_b, .timetable_cell_break, .timetable_cell_lunch { width:100px; background:#999; font-size:10px; } body { background-color: #CCCCFF; } body { background-color: #FF5719; } @charset "utf-8"; /* CSS Document */ body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000; } body { background-color: #CCCCFF; } .main_table th { background:#003399; font-size:24px; color:#FFFFFF; } .main_table { background:#FFF; border:#003399 solid 1px; } .subtitle { font-size:20px; } input#login_username, input#login_password { height:30px; width:300px; font-size:24px; } input#login_submit { height:30px; width:150px; font-size:16px; } .timetable_cell_lesson { width:100px; font-size:10px; } .timetable_cell_tutorial_a, .timetable_cell_tutorial_b, .timetable_cell_break, .timetable_cell_lunch { width:100px; background:#999; font-size:10px; }

    Read the article

  • display items vertically

    - by shawn swanson
    This is my code: <?php while($fetch_cat = mysql_fetch_array($rescat)) { $per_cnt++; ?> <li style="margin-left:10px;"> <a href="sub_cat.php?cat_id=<?php echo $fetch_cat['cat_id'];?>" style="color:#431603;text-decoration:none;"><?php echo stripslashes($fetch_cat['category_name']);?> </a> </li> <?php } ?> This is the output I am getting- alphabetical order horizontally: A B C D E F G H I J This is what I want to show- alphabetical order vertically: A E H B F I C G J D Please help. Thanks

    Read the article

  • Mercurial - Files nog showing on server (ls command)

    - by Bumbolt
    I'm trying to setup a java buildserver with jenkins,maven and mercurial. Now my mercurial server is working i can push, pull and commit. Running the command 'hg serve' on the server allows me to see commits from my clients. But when i go manually into the repository (cd in server-terminal) and do an 'ls' command i can't see any file. When i clone the repository onto a new client i DO recieve the files pushed by the other clients. This is somewhat strange behaviour. Does anyone recognize this? What should i do to fix this?

    Read the article

  • How can I make a URL Shortener in Visual Basic that uses and URL Shortener API?

    - by Andrew
    I want to make a URL Shortener that uses and Online URL Shortener API I want to use this api here - http:// cut2.tk/api-about.php So the api code is this http://cut2.tk/api.php?url= LONG URL HERE I want to use an User Form with 2 TextBoxes and two Buttons The first button is to short URL and the second to copy the Short URL from the second textbox The First Textbox is where Im going to paste the long url, and the second textbox is where im going to get the short url after i press the Short URL button Like this: Can anyone pass me the project or the code please? Thanks in advance Im using Microsoft Excel Developer Visual Basic

    Read the article

  • WordPress contact form email as PDF

    - by lock
    I am using the below code for my WordPress site which is emailing all the form details as an HTML text but I need the details to be written into a PDF first and then have to email the PDF as an attachment. How can I achieve this? This is not a PHP code to use PHP's writePDF modules. So, any idea or any code to implement this? <div style="padding-left: 100px;"> [raw] [contact-form subject="Best Aussie Broker" to="[email protected]"] <div id="main34" style="border: 1px solid black; border-radius: 15px; width: 720px; padding: 15px;"> &nbsp; <h2><span style="color: #ff6600;">Express Application</span></h2> &nbsp; [contact-field label="First Name" type="name" required="true" /] [contact-field label="Last Name" type="text" /] [contact-field label="Email" type="email" required="true" /] [contact-field label="Purpose of Finance?" type="select" options="Home Loan,Refinance,Investment Loan,Debt Consolidation,Other" /] [contact-field label="Your deposit amount" type="text" /] [contact-field label="Amount you need to borrow?" type="text" /] [contact-field label="Brief description of the purpose for finance" type="textarea" required="true" /] <div><label></label> <input class="radio" type="radio" name="19" value="Single Application" onchange="showsingle();" /> <label class="radio">Single Application</label> <div class="clear-form"></div> <input class="radio" type="radio" name="19" value="Joint Application" onchange="showjoint();" /> <label class="radio">Joint Application</label> <div class="clear-form"></div> [contact-field label="Privacy Act" type="checkbox" required="true" /] I have read the Privacy Act 1988 (as Amended) and understand that by selecting the submit button I/we Authorize Best Aussie Broker to act on my/our behalf and manage personal information in relation to this application.<br> <a href="http://googleplex.com.au/pdf.pdf"><img src="http://googleplex.com.au/pdf.png" alt="" /> </a> </div> </div> <div id="single" style="display: none; width: 720px; border: 1px solid black; border-radius: 15px; padding: 15px; margin-top: 10px;"> <div style="padding-top: 10px; width: 720px; text-align: left;"> <h4><span style="color: #ff6600;">Last step then we will get all listed Australian vendors to fight it out for your best deal</span></h4> </div> <div> <label class="select" for="19-date-of-birth">Date of Birth</label> [contact-field label="Day" type="select" options="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31" /] [contact-field label="Month" type="select" options="January,February,March,April,May,June,July,August,September,October,November,December" /] [contact-field label="Year" type="select" options="2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,197,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951,1950,1949,1948,1947,1946,1945,1944,1943,1942,1941,1940,1939,1938,1937,1936,1935,1934,1933,1932,1931,1930,1929,1928,1927,1926,1925,1924,1923,1922,1921,1920, 1919,1918,1917,1916,1915,1914,1913,1912,1911,1910,1909" /] </div> [contact-field label="Address" type="text" /] [contact-field label="Suburb" type="text" /] [contact-field label="Postcode" type="text" /] <div> [contact-field label="State" type="select" options="VIC,NSW,QLD,SA,WA,TAS,NZ,Other" /] </div> [contact-field label="Best Contact" type="radio" options="Landline,Mobile" /] [contact-field label="Phone Number" type="text" /] [contact-field label="Marital Status" type="select" options="Married,Single,Other" /] [contact-field label="Residential Status" type="select" options="Renting, Home Owned, Home Mortgage, Board, Other" /] [contact-field label="Children/Dependents" type="select" options="0,1,2,3,4,5,6" /] <div></div> [contact-field label="Gross Yearly Income" type="text" /] [contact-field label="Current Employer" type="text" /] <div> <label class="select" for="19-year-of-empl">Time at this employer</label> [contact-field label="Year" type="select" options="0,1,2,3,4,5,6,7,8,9,10,More" /] [contact-field label="Month" type="select" options="0,1,2,3,4,5,6,7,8,9,10,11,12" /] </div> <div style="padding-right: 15px;"></div> </div> <div id="joint" style="display: none; width: 720px; border: 1px solid black; border-radius: 15px; padding: 15px; margin-top: 10px;"> <div style="padding-top: 10px; width: 720px; text-align: left;"> <h4><span style="color: #ff6600;">Last step then we will get all listed Australian vendors to fight it out for your best deal</span></h4> </div> <div style="float: left; width: 320px;"> <div> <label class="select" for="19-date-of-birth1">Date of Birth</label> [contact-field label="Day" type="select" options="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31" /] [contact-field label="Month" type="select" options="January,February,March,April,May,June,July,August,September,October,November,December" /] [contact-field label="Year" type="select" options="2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,197,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951,1950,1949,1948,1947,1946,1945,1944,1943,1942,1941,1940,1939,1938,1937,1936,1935,1934,1933,1932,1931,1930,1929,1928,1927,1926,1925,1924,1923,1922,1921,1920, 1919,1918,1917,1916,1915,1914,1913,1912,1911,1910,1909" /] </div> [contact-field label="Address" type="text" /] [contact-field label="Suburb" type="text" /] [contact-field label="Postcode" type="text" /] <div> [contact-field label="State" type="select" options="VIC,NSW,QLD,SA,WA,TAS,NZ,Other" /] </div> [contact-field label="Best Contact" type="radio" options="Landline,Mobile" /] [contact-field label="Phone Number" type="text" /] <div></div> <div></div> [contact-field label="Marital Status" type="select" options="Married,Single,Other" /] [contact-field label="Residential Status" type="select" options="Renting, Home Owned, Home Mortgage, Board, Other" /] [contact-field label="Children/Dependents" type="select" options="0,1,2,3,4,5,6" /] <div></div> <div><label class="text" for="netincome">Net Income</label> <input id="netincome" type="text" name="netincome" /> <select id="netincome-dropdown" name="netincome-dropdown"> <option>Monthly</option> <option>Yearly</option> </select></div> [contact-field label="Current Employer" type="text" /] <div> <label class="select" for="19-year-of-empl2">Time at this employer</label> [contact-field label="Year" type="select" options="0,1,2,3,4,5,6,7,8,9,10,More" /] [contact-field label="Month" type="select" options="0,1,2,3,4,5,6,7,8,9,10,11,12" /] </div> </div> <div style="float: right; width: 320px; padding-right: 50px;"> <div> <label class="select" for="19-date-of-birth3">Date of Birth</label> [contact-field label="Day" type="select" options="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31" /] [contact-field label="Month" type="select" options="January,February,March,April,May,June,July,August,September,October,November,December" /] [contact-field label="Year" type="select" options="2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,197,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951,1950,1949,1948,1947,1946,1945,1944,1943,1942,1941,1940,1939,1938,1937,1936,1935,1934,1933,1932,1931,1930,1929,1928,1927,1926,1925,1924,1923,1922,1921,1920, 1919,1918,1917,1916,1915,1914,1913,1912,1911,1910,1909" /] </div> [contact-field label="Address" type="text" /] [contact-field label="Suburb" type="text" /] [contact-field label="Postcode" type="text" /] <div> [contact-field label="State" type="select" options="VIC,NSW,QLD,SA,WA,TAS,NZ,Other" /] </div> [contact-field label="Best Contact" type="radio" options="Landline,Mobile" /] [contact-field label="Phone Number" type="text" /] <div></div> <div></div> [contact-field label="Marital Status" type="select" options="Married,Single,Other" /] [contact-field label="Residential Status" type="select" options="Renting, Home Owned, Home Mortgage, Board, Other" /] [contact-field label="Children/Dependents" type="select" options="0,1,2,3,4,5,6" /] <div></div> <div><label class="text" for="netincome">Net Income</label> <input id="netincome" type="text" name="netincome" /> <select id="netincome-dropdown" name="netincome-dropdown"> <option>Monthly</option> <option>Yearly</option> </select></div> [contact-field label="Current Employer" type="text" /] <div> <label class="select" for="19-year-of-empl">Time at this employer</label> [contact-field label="Year" type="select" options="0,1,2,3,4,5,6,7,8,9,10,More" /] [contact-field label="Month" type="select" options="0,1,2,3,4,5,6,7,8,9,10,11,12" /] </div> </div> <div style="clear: both;"></div> <div></div> </div> &nbsp; [/contact-form][/raw] </div>

    Read the article

  • My java.util.Scanner won't work

    - by Kevin Steen Hansen
    Hello Stackoverflow my code is getting this error: Skriv din alder herunder og tryk enter: Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Scanner.java:907) at java.util.Scanner.next(Scanner.java:1530) at java.util.Scanner.nextInt(Scanner.java:2160) at java.util.Scanner.nextInt(Scanner.java:2119) at Tasteturindtastning.main(Tasteturindtastning.java:20) [Finished in 1.7s with exit code 1] Adn my code is: // Starter java som man plejer, læs i HejVerden.java public class Tasteturindtastning { public static void main(String[] arg) { /* Jeg skal nu angive en variable, men jeg kan ikke bestemme denne variable * Da jeg ønsker at indtastningen fra dette tastetur skal være variablen. * I stedet for int og double bruger jeg så java.util.Scanner, som aflæser * brugerens indtastninger. */ java.util.Scanner tastetur = new java.util.Scanner(System.in); // Printer en opgave/spørgsmål til brugeren System.out.println("Skriv din alder herunder og tryk enter:"); int alder; // Angiver et variablenavn alder = tastetur.nextInt(); // Angiver variablen med værdien fra indtastningen /* Herunder gør jeg brug af et if statement der tjekker værdien for * variablen alder, og ser om den er lig med eller højere end 18, og hvis * dette er tilfældet, så udprinter den en sætning */ if (alder >= 18) System.out.println("Du er myndig, da du er " + alder + " år gammel"); // Printes hvis han er 18 eller ældre } } Can snyone tell me what is wrong?

    Read the article

  • Space between 2 vertices on a heightmap

    - by Sietse
    First off, I am sorry for the crazy title. I couldn't really think of something else. I am working on a hobby project, it's a infinite world generated with Perlin Noise, Java and LWJGL. But I am having a problem, it is kinda hard to explain, so I made a video: http://youtu.be/D_NUBJZ_5Kw Obviously the problem is the black spaces in between all the pieces of ground. I have no idea what is causing it. I already tried making all the values doubles instead of floats, but that didn't fix it. Here is a piece of code I am using: float height2, height = (float)getHeight(x, y); height2 = (float) ((getHeight(x-1, y+1) + height) / 2); vertexhelper.addVertexColorAndTexture(x, height2, y+1, r, g, b, a, 0f, 1f); height2 = (float) ((getHeight(x+1, y+1) + height) / 2); vertexhelper.addVertexColorAndTexture(x+1, height2, y+1, r, g, b, a, 1f, 1f); height2 = (float) ((getHeight(x+1, y-1) + height) / 2); vertexhelper.addVertexColorAndTexture(x+1, height2, y, r, g, b, a, 1f, 0f); height2 = (float) ((getHeight(x-1, y-1) + height) / 2); vertexhelper.addVertexColorAndTexture(x, height2, y, r, g, b, a, 0f, 0f); I loop through this at the initialization of a chunk with x-16 and y-16. vertexhelper is a class I made that just puts everything in a array. (I am using floats here, but that's after doing the maths, so that shouldn't be a problem) I highly appreciate you reading this.

    Read the article

  • Android - Widget to Play Video (onclick trouble)

    - by Josh
    I am trying to make a simple widget that will play a movie from the sdcard when clicked on. This seems simple enough, and by following tutorials I've come up with the following code, but it seems the onclick is never setup. Manifest: <receiver android:name="WidgetProvider" android:label="DVD Cover"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_info_2x4"/> </receiver> Layout (widget.xml): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/holder" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ff777777" > <ImageView android:id="@+id/cover" android:layout_width="wrap_content" android:layout_height="fill_parent" android:textColor="#000000" /> </LinearLayout> appwidget.xml: <?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="200dip" android:minHeight="300dip" android:updatePeriodMillis="180000" android:initialLayout="@layout/widget" > </appwidget-provider> WidgetProvider.java: public class WidgetProvider extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { String movieurl = Environment.getExternalStorageDirectory().getPath() + "/Movie.mp4"; Intent notificationIntent = new Intent(Intent.ACTION_VIEW); notificationIntent.setDataAndType(Uri.parse(movieurl), "video/*"); PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent,0); // Get the layout for the App Widget and attach an on-click listener // to the button RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget); views.setOnClickPendingIntent(R.id.holder, contentIntent); // Tell the AppWidgetManager to perform an update on the current app widget appWidgetManager.updateAppWidget(appWidgetIds, views); } } Any help would be greatly appreciated. Thanks, Josh

    Read the article

  • Issue Calculating from Rows and Columns(Summing two columns with the third of a different row)

    - by vstsdev
    With reference to my previous question Adding columns resulting from GROUP BY clause SELECT AcctId,Date, Sum(CASE WHEN DC = 'C' THEN TrnAmt ELSE 0 END) AS C, Sum(CASE WHEN DC = 'D' THEN TrnAmt ELSE 0 END) AS D FROM Table1 where AcctId = '51' GROUP BY AcctId,Date ORDER BY AcctId,Date I executed the above query and got my desired result.. AcctId Date C D 51 2012-12-04 15000 0 51 2012-12-05 150000 160596 51 2012-12-06 600 0 now I have a another operation to do on the same query i.e. I need the result to be like this AcctId Date Result 51 2012-12-04 (15000-0)-> 15000 51 2012-12-05 (150000-160596) + (15000->The first value) 4404 51 2012-12-06 600-0 +(4404 ->The calculated 2nd value) 5004 Is it possible with the same query??.

    Read the article

  • Real Time Monitoring System using .net [closed]

    - by sameer
    Need to know the right way of accomplishing this task. Task Description: We need to develop the application which display the dashboard where data from various SQL DB is fetched from different servers and displayed. Now this need to happen real time we can have refresh time say 5 min. Please refer the analogy so that it will help me to take the right path. Here are some details, Just for your reference. 1) How many servers? This application may support around Max 100 servers. 2) This Application will be used by Administrator to find the health of the SQL Server DB. 3) This will be build by 2 developers in approx 3 months time. 4) Refresh rate will be configurable as a Administrator option. Regards, Sameer

    Read the article

  • How to add Compass syntax support to Jetbrains PhpStorm?

    - by Madara Uchiha
    I'm using JetBrains PhpStorm, which is probably the most epic IDE I've ever used. The question is simple. How do I add Compass syntax support to it? I've got it installed, it renders and works, but PhpStorm still complains about undefined imports and mixins. How can I resolve this? Can Compass be included as an external library? Edit: I'd just like to note that this feature request is for the RubyMine IDE (also by JetBrains), it's not for PhpStorm/WebStorm.

    Read the article

  • Spring ROO issue with UrlRewrite in STS (eclipse)

    - by user224270
    I'm having trouble figuring out how to solve this issue. I have a file called: "urlrewrite.xml" which was automatically generated by spring ROO after running the "controller" command in ROO Shell. However, I still get the following error: "Referenced file contains errors (http://tuckey.org/res/dtds/urlrewrite3.0.dtd). For more information, right click on the message in the Problems View and select "Show Details..." Here's the content of the urlrewrite.xml file: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN" "http://tuckey.org/res/dtds/urlrewrite3.0.dtd"> <urlrewrite default-match-type="wildcard"> <rule> <from>/resources/**</from> <to last="true">/resources/$1</to> </rule> <rule> <from>/static/WEB-INF/**</from> <set type="status">403</set> <to last="true">/static/WEB-INF/$1</to> </rule> <rule> <from>/static/**</from> <to last="true">/$1</to> </rule> <rule> <from>/</from> <to last="true">/app/index</to> </rule> <rule> <from>/app/**</from> <to last="true">/app/$1</to> </rule> <rule> <from>/**</from> <to>/app/$1</to> </rule> <outbound-rule> <from>/app/**</from> <to>/$1</to> </outbound-rule> </urlrewrite> Any thoughts on how to get rid of this error?

    Read the article

  • RedStation.com is heaven for ddos attackers, How to file complaint?

    - by Ehsan
    Sorry, I don't know where to open this subject. This is not the first time we have faced with a massive DDOS attack from one of servers in RedStation.com and even after we had contacted with their abuse department with it's log there is no cooperation and they don't even like to bother themselves about it. and we don't know how to stop such activity. Do you know how to file complaint against this datacenter? we could not be patient anymore and see they are not care about such things on their network ? it seems like they are heaven for attackers now since they close their eyes to gain more money. I guess some global organization is missing in this matter to investigate such activity and make sure providers are responsible for their services. Here is some of it's log: 2686M 75G DROP all -- * * 31.3-RedStation 0.0.0.0/0 rt: 16167 0.002007 31.3-RedStation -> my-server-ip UDP Source port: 36391 Destination port: 16167 0.002011 31.3-RedStation -> my-server-ip UDP Source port: 38367 Destination port: 16312 0.002014 31.3-RedStation -> my-server-ip UDP Source port: 39585 Destination port: 12081 0.002018 31.3-RedStation -> my-server-ip UDP Source port: 39585 Destination port: 12081 0.002021 31.3-RedStation -> my-server-ip UDP Source port: 38367 Destination port: 16312 0.002025 31.3-RedStation -> my-server-ip UDP Source port: 39585 Destination port: 12081 0.002033 31.3-RedStation -> my-server-ip UDP Source port: 36391 Destination port: 16167 0.002037 31.3-RedStation -> my-server-ip UDP Source port: 38367 Destination port: 16312 0.002040 31.3-RedStation -> my-server-ip UDP Source port: 38367 Destination port: 16312 0.002044 31.3-RedStation -> my-server-ip UDP Source port: 38367 Destination port: 16312 0.002047 31.3-RedStation -> my-server-ip UDP Source port: 39585 Destination Any response would be appreciated

    Read the article

  • How to run nodejs on linux platform

    - by rotem
    How to run node.js on host with linux platform? To run node.js on localhost with windows operation system is simple I download package from nodejs.org/download/ and I execute Windows Installer (.msi) I go to console command line and I type node file.js and everything fine. but in my host with linux platform I have control panel with no option to run type file exe, msi and there is no window with command line, So how can I be able to run nodejs on my host? I call to support of my hosting bluehost.com and they don't know. my Details server and control panel Thanks for any help

    Read the article

  • Installing mysqlnd for php 5.4.9 on CentOs 6.3

    - by kira423
    Okay let me get straight to the point, I am a complete noob, and have never done stuff like this at all, I have read tutorial after tuorial but I cant get anything to work. When I tried to install the rpm file I got this error rpm -Uvh ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/6/test/x86_64/php-mysqlnd-5.4.9-1.el6.remi.x86_64.rpm Retrieving ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/6/test/x86_64/php-mysqlnd-5.4.9-1.el6.remi.x86_64.rpm warning: /var/tmp/rpm-tmp.ez4vvd: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY error: Failed dependencies: php-pdo(x86-64) = 5.4.9-1.el6.remi is needed by php-mysqlnd-5.4.9-1.el6.remi.x86_64 so I tried installing that rpm file and got this error rpm -ivh ftp://ftp.pbone.net/mirror/rrpms.famillecollet.com/enterprise/6/test/x86_64/php-pdo-5.4.6-1.el6.remi.x86_64.rpm Retrieving ftp://ftp.pbone.net/mirror/rrpms.famillecollet.com/enterprise/6/test/x86_64/php-pdo-5.4.6-1.el6.remi.x86_64.rpm curl: (9) Server denied you to change to the given directory error: skipping ftp://ftp.pbone.net/mirror/rrpms.famillecollet.com/enterprise/6/test/x86_64/php-pdo-5.4.6-1.el6.remi.x86_64.rpm - transfer failed I used the ftp links because I have no idea how else to get them to the server. I think I am getting overly frustrated with this, but I have to get this driver installed for any of my scripts to function correctly. Any help would be greatly appreciated!

    Read the article

  • How much ram to be able to convert large (5-6MB) jpegs? [closed]

    - by cosmicbdog
    I've got a project where we want to be processing large jpegs (5-6MB) with apache and php (using GD library). My understanding is that the server converts the image into a BMP making it quite ram heavy and currently we're unable to do it with our 1gb of memory. Here's the error we get: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 17408 bytes) How much ram should we be looking at running with to process images of this size? Edit: As Chris S the purist highlighted below, my post is apparently vague. I am doing the most basic and common manipulation of an image, say turning it from a 4352px x 3264px jpg of 5mb in size, to a 900px x 675px file.

    Read the article

  • Squid gives always tcp_miss reverse proxy

    - by JaakL
    I added installed latest squid3 in front of apache as reverse proxy. The problem is that it gives always tcp_miss, in fact I have not yet found a single TCP_HIT message in the log file, and most of the content is static. Relevant config values for cache_dir and refresh_pattern are default ones, directory /var/spool/squid3 exists and has some files/folders. I have 100+G free storage, but reconfigure gives warning "WARNING cache_mem is larger than total disk cache space!", which does not make any sense to me. I have googled a lot and seen with similar problems, but none of them has helped.

    Read the article

  • Cluster for game servers [closed]

    - by Boby
    We want to make a cluster for game servers, but we don't know which cluster system to choose. We need load balancing cluster. Now we have 2 server for test (First - 2 x Xeon E5320, 8 GB RAM and second i5 2500, 16 GB RAM), this servers will work as nodes. After we will add more. We use Linux. We need some help with cluster. We don't know which cluster system to use for this reason. And maybe some help (instructions). And please don't say that we need to forget it. Thank you for answers!

    Read the article

  • Moving Farm to co-location hosting - network settings requirements

    - by Saariko
    I am moving my farm (2 Dell's R620) to a co-location hosting service. I am trying to figure out the secure way to have my network settings The requirements are: VM1 is the working HOST, includes: esxi 5.1, vSphere, 4 clients (w2008r2 all) VM2 has esxi 5.1 installed, and a single machine with Veeam Backup and copy 6.5 - keeping a copy of VM1 clients on the VM2 internal storage (this solution is due to a very small budget - in case of failure on Host 1 - can redirect IP's) Only 2 VM clients require network address and access from the WWAN - ISP provides IP's range for them (with Gateway and DNS) I need connection to the iDrac's from my office (option to create a VPN-SSL tunnel) Connection to the vSphere appliances I want to be able to RDP to the VM clients The current configuration is that each host has the iDrac dedicated nic connected , and another (NIC #1) connected - with a static IP on 192.168.3.x The iDrac's have a static IP from the same network range (19.168.3.x) It will look something like this: My thoughts: On NIC#2 of both hosts I will connected a crossed cable I will give each VM clients that needs internet access a 2ndry VM network with the assigned IP from the ISP open only to web - can not access from the My Question: Should I give IP's (external) to the machines who DO NOT require WWAN Access? - I can't see a way to RDP to them directly if not. Should I use the crossed cable? or just plug NIC #2 to the switch? Will this setup even work? What do I need to verify? What Virtual nic's and/or switches should I create on the Hosts?

    Read the article

  • Freebsd ports installing with parameters

    - by DeaglinG
    I'm trying to create a install script for some FreeBSD machines. I want to install a few ports but change several configurations before installing, and without the dialog popup. I've tried almost everything but no success. I.E: I'm trying to install nginx with HTTP_SSL module but i can't seem to pass the correct parameter to the make install clean command. I also want to use all other default settings, and only change this one. Any help will be appreciated.

    Read the article

  • Why does unpartitioned Hitachi HDS5C3020 drive start consuming 50% more power 15 minutes after boot?

    - by Pro Backup
    In a Debian 6.0.6 system there are 74 pieces of 2TB Toshiba DT01ABA200 drives. These drives are identified as Hitachi HDS5C3020BLE630 drives running firmware revision MZ4OAAB0. 64 Drives attached via HP SAS expander cards to an LSI 2008 SAS controller, another 5 drives are connected directly to the mainboard, 4 drives are connected to a Sil based PCI controller and last 1 drive is only powered and has no data cable connected. The controller LSI and Sil card's their onboard BIOS are both disabled and the mpt2sas and sata_sil modules are removed from the Linux debian 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux kernel. The mpt2sas module is loaded after boot using a modprobe command in /etc/rc.local. These 74 drives are not partitioned, neither formatted and also not mounted. The system consumes: with 0 drives: 70.6 - 70.9 Watt (also 15 minutes after boot); with 74 drives: 330 - 360 Watt, just after boot (is equivalent to 3.5 - 3.9W per drive in idle state); with 74 drives: 420 - 466 Watt, each time in the 15th minute of uptime (is equivalent to 4.7 - 5.3W per drive in idle state). The drive specification lists 4.7W as read/write, and 3.3W as idle power consumption. The increased power consumption is most likely on the 5V line, because after roughly 1 minute an "over current protection" (OCP) of the power supply (PSU) shuts down the power. The used PSU is a single rail model with an OCP of 122A on the 12V line and 55A on the 5V line. Regression: It doesn't matter whether the drive its APM value is set to disabled or 1 (maximum power saving). The operating system records no read/write activity in /proc/diskstats. The values there are identical (28 read, 0 write operations) as immediately after the modprobe operation. Can't test what happens when booting into the mainboard it's BIOS - to exclude any OS intervention - because the Super Micro X8SI6-F mainboard running firmware 06/27/12 has a bug that incorrectly reads a +74.0 C CPU sensor temperature as "High" in BIOS mode, and shuts down the power after 1 minute. What might be causing the drive read/write activity on all drives in the 15th minute after boot and how to prevent it from happening?

    Read the article

  • Redirect all ports to my server in a simple way

    - by Dorian
    I have a server with SSH access (on port 22 and 443). My ISP block everything except ports 80 and 443. I there a simple way to make everything go to my server (via SSH) then return the response via the same SSH connection, but in a way I can use all the ports in my client. Like : Me ? SSH connection ? My server ? request ? Server ? My server ? Me It's like a VPN but I don't have any port available for a VPN (443 is already taken by SSH).

    Read the article

  • IP address times out

    - by Werner
    I'm running a dedicated server with a couple of game servers running on 4 different IP addresses. The most network-heavy server times out a few times during peak hours and all other communication (FTP/SSH) through the same IP also briefly times out. Other servers using other IPs are fine and unaffected as well as FTP/SSH using other IPs. The server is running Debian 6. What causes this, and is there anything I can do?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >