Search Results

Search found 460 results on 19 pages for 'den shade'.

Page 12/19 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • DIY Sunrise Simulator Combines Microchips, LEDs, and Laser Cut Goodness

    - by Jason Fitzpatrick
    Sunrise simulators use a gradually brightening light to wake you in the morning. Check out this creative build that combines a microprocessor, addressable LEDs, and a nifty laser-cut bracket to yield a polished and wall-mountable alarm clock lamp. Courtesy of NYC-based tinker Holly, the project features a detailed build guide that references all the other projects that inspired her sunrise simulator. Hit up the link below to check out everything from her laser cut shade brackets to the Adafruit module she used to control the light timing. Sunrise Lamp Alarm Clock [via Make] How To Create a Customized Windows 7 Installation Disc With Integrated Updates How to Get Pro Features in Windows Home Versions with Third Party Tools HTG Explains: Is ReadyBoost Worth Using?

    Read the article

  • Why is Firefox changing the color calibration of this image?

    - by eoinoc
    The symptom of my problem is that the same hex color in a PNG image does not match the CSS-defined color defined by the same hex code. This problem only happens in Firefox when gfx.color_management.mode is set to 2 (tagged images only) rather than 0 (off). (Firefox ICC color correction described here). The image is http://dzfk93w6juz0e.cloudfront.net/images/background-top-light.png which at the bottom has the color #c8e8bd. However, the shade of green is different to that color when Firefox color calibration is enabled. Is this image inadvertently "tagged" for color correction?

    Read the article

  • Send email with PHP script -> How to display mutated vowels?

    - by Sebi
    I use this php script to send an email. It works well, but german mutated vowels (ö,ä,ü, etc) are not displayed correctly. Any hints how to change that? <?php /* Geben Sie hier Ihre E-Mail Adresse zwischen den beiden " an: */ $_emails[0] = "[email protected]"; // Wenn keine $_POST Daten übermittelt wurden, dann abbrechen if(!isset($_POST) OR empty($_POST)) { header("Content-type: text/plain"); echo "Es wurden keine Daten übermittelt!"; exit; } else { // Datum, Uhrzeit und Pfad zum eigenen Script feststellen $date = date("d.m.Y"); $time = date("H:i"); $host = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; // Empfänger feststellen und auf Gültigkeit prüfen if(isset($_POST['recipient']) AND isset($_emails[ $_POST['recipient'] ]) AND preg_match("/^.*@.*\..*$/", $_emails[ $_POST['recipient'] ])) { $recipient = $_emails[ $_POST['recipient'] ]; } // Wurde kein (gültiger) Empfänger angegeben, es mit $_email[0] versuchen elseif(isset($_emails[0]) AND preg_match("/^.*@.*\..*$/", $_emails[0])) { $recipient = $_emails[0]; } // Ist auch diese Adresse ungültig, mit Fehlermeldung abbrechen else { header("Content-type: text/plain"); echo "Fehler im Script - es wurde kein Empfänger oder eine ungültige E-Mail Adresse in \ angegeben."; exit; } // Wenn Betreff übermittelt, diesen verwenden if(isset($_POST['subject'])) { $subject = $_POST['subject']; } // sonst einen Default Betreff verwenden else { $subject = "Formular Daten von {$_SERVER['HTTP_HOST']}"; } // E-Mai Kopf generieren $email = "Formular Eintrag\n" . "\n" . "Am $date um $time Uhr hast das Script auf $host Formulardaten empfangen,\n" . "welche nach Angabe des Browsers von {$_SERVER['HTTP_REFERER']} stammen.\n" . "\n" . "Der Formular Inhalt wird nachfolgend wiedergegeben.\n" . "\n"; // Alle $_POST Werte an den E-Mail Kopf anhängen foreach($_POST as $key => $value) { if($key == "redirect" OR $key == "recipient" OR $key == "subject") { continue; } $email .= "Fomular Feld '$key':\n" . "=============================\n" . "$value\n" . "\n"; } // E-Mail Fuß anfügen $email .= "=============================\n" . "Ende der automatisch generierten E-Mail."; // Versuchen E-Mail zu versenden if(!mail($recipient, $subject, $email)) { // Ist dies gescheitert, Fehlermeldung ausgeben echo "Es ist ein Fehler beim Versenden der E-Mail aufgetreten," . " eventuell liegt ein Konfigurationsfehler am Server vor.\n\n"; exit; } // Wenn gewünscht, auf Bestätigungsseite weiterleiten if(isset($_POST['redirect']) AND preg_match("=^(http|ftp)://.*\..*$=", $_POST['redirect'])) { header("Location: ".$_POST['redirect']); exit; } else { header("Content-type: text/html"); echo "Die E-Mail wurde erfolgreich versendet."; echo '<br>'; echo '<a href="http://www.ovlu.li/cms/index.php?page=kontakt">Zurueck</a>'; exit; } } ?> So i followed the hint in the first answer and the code looks now the following: <?php /* Geben Sie hier Ihre E-Mail Adresse zwischen den beiden " an: */ $_emails[0] = "[email protected]"; // Wenn keine $_POST Daten übermittelt wurden, dann abbrechen if(!isset($_POST) OR empty($_POST)) { header("Content-type: text/plain; charset=utf-8"); echo "Es wurden keine Daten übermittelt!"; exit; } else { // Datum, Uhrzeit und Pfad zum eigenen Script feststellen $date = date("d.m.Y"); $time = date("H:i"); $host = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; // Empfänger feststellen und auf Gültigkeit prüfen if(isset($_POST['recipient']) AND isset($_emails[ $_POST['recipient'] ]) AND preg_match("/^.*@.*\..*$/", $_emails[ $_POST['recipient'] ])) { $recipient = $_emails[ $_POST['recipient'] ]; } // Wurde kein (gültiger) Empfänger angegeben, es mit $_email[0] versuchen elseif(isset($_emails[0]) AND preg_match("/^.*@.*\..*$/", $_emails[0])) { $recipient = $_emails[0]; } // Ist auch diese Adresse ungültig, mit Fehlermeldung abbrechen else { header("Content-type: text/plain"); echo "Fehler im Script - es wurde kein Empfänger oder eine ungültige E-Mail Adresse in \ angegeben."; exit; } // Wenn Betreff übermittelt, diesen verwenden if(isset($_POST['subject'])) { $subject = $_POST['subject']; } // sonst einen Default Betreff verwenden else { $subject = "Formular Daten von {$_SERVER['HTTP_HOST']}"; } // E-Mai Kopf generieren $email = "Formular Eintrag\n" . "\n" . "Am $date um $time Uhr hast das Script auf $host Formulardaten empfangen,\n" . "welche nach Angabe des Browsers von {$_SERVER['HTTP_REFERER']} stammen.\n" . "\n" . "Der Formular Inhalt wird nachfolgend wiedergegeben.\n" . "\n"; // Alle $_POST Werte an den E-Mail Kopf anhängen foreach($_POST as $key => $value) { if($key == "redirect" OR $key == "recipient" OR $key == "subject") { continue; } $email .= "Fomular Feld '$key':\n" . "=============================\n" . "$value\n" . "\n"; } // E-Mail Fuß anfügen $email .= "=============================\n" . "Ende der automatisch generierten E-Mail."; $email = htmlentities($email, ENT_QUOTES, 'uft-8'); // Versuchen E-Mail zu versenden if(!mail($recipient, $subject, $email)) { // Ist dies gescheitert, Fehlermeldung ausgeben echo "Es ist ein Fehler beim Versenden der E-Mail aufgetreten," . " eventuell liegt ein Konfigurationsfehler am Server vor.\n\n"; exit; } // Wenn gewünscht, auf Bestätigungsseite weiterleiten if(isset($_POST['redirect']) AND preg_match("=^(http|ftp)://.*\..*$=", $_POST['redirect'])) { header("Location: ".$_POST['redirect']); exit; } // sonst eine Bestätigung ausgeben else { header("Content-type: text/html"); echo "Die E-Mail wurde erfolgreich versendet."; echo '<br>'; echo '<a href="http://foto.roser.li/admin/index.php?page=kontakt">Zurueck</a>'; exit; } } ?> Now when I send the email, the following message is displayed: > Warning: htmlentities(): charset > `uft-8' not supported, assuming > iso-8859-1 in > /home/www/web21/html/roser/foto/admin/mail.php > on line 77 Die E-Mail wurde > erfolgreich versendet.

    Read the article

  • Rmagick, Watermarks, and Image Transparency

    - by Hulihan Applications
    I'm having trouble making an image semi-transparent. I have one image I'd like to set to 50% opacity and position it over another image(using composite operator:OverCompositeOp). Anyone know how an easy way to do such a thing? A little background: I'm trying to make a good watermark to place over images, but I'm not fan of rmagick's built-in watermark() function or the shade-composite method.

    Read the article

  • .exe is not created when using launch4j and maven

    - by Ismail Sen
    I'm trying to create an exe file for my JAVA project using launch4j and Maven. Here is my pom.xml <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.3.2</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <configuration> <descriptorRefs> <descriptortRef>jar-with-dependencies</descriptortRef> </descriptorRefs> <archive> <manifest> <mainClass>dev.main.App</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.7.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>shaded</shadedClassifierName> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>dev.main.App</mainClass> </transformer> </transformers> </configuration> </plugin> <plugin> <groupId>com.akathist.maven.plugins.launch4j</groupId> <artifactId>launch4j-maven-plugin</artifactId> <version>1.5.1</version> <executions> <execution> <id>l4j-clui</id> <phase>package</phase> <goals> <goal>launch4j</goal> </goals> <configuration> <headerType>console</headerType> <jar>${project.build.directory}/target/App-jar-with-dependencies.jar</jar> <outfile>${project.build.directory}/target/App.exe</outfile> <downloadUrl>http://java.com/download</downloadUrl> <classPath> <mainClass>dev.main.App</mainClass> </classPath> <jre> <minVersion>1.6.0</minVersion> <jdkPreference>preferJre</jdkPreference> </jre> <versionInfo> <fileVersion>1.0.0.0</fileVersion> <txtFileVersion>${project.version}</txtFileVersion> <fileDescription>${project.name}</fileDescription> <copyright>C</copyright> <productVersion>1.0.0.0</productVersion> <txtProductVersion>1.0.0.0</txtProductVersion> <productName>${project.name}</productName> <internalName>AppName</internalName> <originalFilename>App.exe</originalFilename> </versionInfo> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement> </build> I run : mvn clean compile assembly:single to create my jar app with all Maven dependencies. To create the .exe I do : mvn package but nothing is created under target folder. Am I missing a goal or a configuration ? Ismail

    Read the article

  • colorizing UIbuttons

    - by Joey
    Does someone know how to colorize a UIButton (iphone)? I have a greyscale image with alpha that I want to colorize to various different colors. Setting things like background color only shade the entire image without respecting the alpha. Is there a straightforward way to do this, or will I need to subclass UIButton and overload the drawRect method perhaps? Thanks.

    Read the article

  • ColorMatrix equivalent in XNA

    - by Charles
    In XNA, how can I achieve the same effect of applying a System.Drawing.Imaging.ColorMatrix? The following article shows how I would like to render my sprites, but it uses GDI+: http://www.c-sharpcorner.com/UploadFile/mahesh/Transformations0512192005050129AM/Transformations05.aspx How can this be done in XNA? Is there a general purpose shade I can use? Any help would be aprreciated.

    Read the article

  • Mathematica, PDF Curves and Shading

    - by Venerable Garbage Collector
    I need to plot a normal distribution and then shade some specific region of it. Right now I'm doing this by creating a plot of the distribution and overlaying it with a RegionPlot. This is pretty convoluted and I'm certain there must be a more elegant way of doing it. I Googled, looked at the docs, found nothing. Help me SO! I guess Mathematica counts as programming? :D

    Read the article

  • Write to file depending on minSdkVersion - android

    - by Simon Rosenqvist
    Hi, I have written a filewriter for my android application. It is to function on a Galaxy Tab, so my minSdkVersion has to be at least 4, so it will fill the screen. I originally started out with SdkVersion = 2 and at that point my filewriter worked perfectly. Changing the SdkVersion to 4 introduced the problem. My filewriter doesn't work anymore! The application runs fine, but a file doesn't get created. My .java file looks like this: public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello, Android"); setContentView(R.layout.main); //definerer en knap kaldet button1 og sætter en listener på denne. Button button1 = (Button)findViewById(R.id.btnClickMe); button1.setOnClickListener(btnListener); //definerer en knap kaldet button2 og sætter en listener på denne. Button button2 = (Button)findViewById(R.id.btnClickMe2); button2.setOnClickListener(btnListener2); } //en variabel af typen 'long' deklæres og kaldes tid1. public long time1; private OnClickListener btnListener = new OnClickListener() { public void onClick(View v) { //Når der klikkes på button1 gemmes et tal i variablen tid1. time1 = System.currentTimeMillis(); } }; //en variabel af typen 'long' deklæres og kaldes tid2. public long time2; // en variabel af typen 'string' deklæres og kaldes tid: public String string1 = "time:"; private OnClickListener btnListener2 = new OnClickListener() { public void onClick(View v) { //Når der klikkes på button2 gemmes et tal i variablen tid2. time2 = System.currentTimeMillis(); // Herefter oprettes en fil kaldet "file.txt". try{ File file = new File(Environment.getExternalStorageDirectory(), "file.txt"); file.createNewFile(); BufferedWriter writer = new BufferedWriter(new FileWriter(file,true)); //string1 og tid2-tid1 skrives til filen. tid2-tid1 giver den tid der går fra der er trykket på den ene knap til den anden i millisekunder. writer.write(string1 + "\t" + (time2-time1)); writer.newLine(); writer.flush(); writer.close(); } catch (IOException e) { e.printStackTrace(); } } }; } And my manifest.xml looks like this: <?xml version="1.0" encoding="utf-8"?> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloAndroid" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> Why does my filewriter not work with minSdkVersion 2? Do i have to make a new filewriter? or what to do? Sorry for the messy code, i'm quite new to programming :)

    Read the article

  • Silverlight Cream for February 17, 2011 -- #1048

    - by Dave Campbell
    In this Issue: Oren Gal, Andrea Boschin(-2-), Kevin Hoffman, Rudi Grobler(-2-, -3-), Michael Crump, Yochay Kiriaty, Peter Kuhn, Loek van den Ouweland, Jeremy Likness, Jesse Liberty, and WindowsPhoneGeek. Above the Fold: Silverlight: "Multiple page printing in Silverlight4 - Part 2 - preview before printing" Oren Gal WP7: "Windows Phone 7 Tombstoning with MVVM and Sterling" Jeremy Likness XNA: "XNA for Silverlight developers: Part 4 - Animation (frame-based)" Peter Kuhn From SilverlightCream.com: Multiple page printing in Silverlight4 - Part 2 - preview before printing Oren Gal has part 2 of his Printing with Silverlight 4 series up, and this time he's putting up a preview... how cool is that? Inject ApplicationServices with MEF reloaded: supporting recomposition Andrea Boschin revisited his Inject ApplicationServices with MEF post because of feedback, and took it from the realm of an interesting example to a useful solution. Windows Phone 7 - Part #5: Panorama and Pivot controls Andrea Boschin also has part 5 of his WP7 series up at SilverlightShow... want a good demo of both the panorama and the pivot controls... here it is all in one tutorial WP7 for iPhone and Android Developers - Introduction to C# This should be good.. a 12-part series on SilverlightShow by Kevin Hoffman on porting your iPhone/Android app to WP7... this first part an intro to C# Balls of Steel Rudi Grobler discusses the upcoming (?) release of 'Duke Nukem Forever', and has a 'soundboard' for WP7 to celebrate the event... get your Duke Nukem on with these sounds! Moonlight 4 (Preview) is here Rudi Grobler also has a post up about the release of Moonlight by Novel for Silverlight 4!... explanation and links on his post. WP7 Podcasts Rudi Grobler highlights two WP7 Podcasts that are putting out good material... check them out if you haven't already. Having Fun with Coding4Fun’s Windows Phone 7 Controls Michael Crump takes a look at his WP7 app and uses the Coding4Fun project toolset while doing so... getting the tools, setting them up, and consuming them. Windows Phone Silverlight Application Faster Load Time Yochay Kiriaty has a good long discussion up about how to get faster load time out of your WP7 apps... good useful external links throughout. XNA for Silverlight developers: Part 4 - Animation (frame-based) Peter Kuhn's part 4 of his XNA for Silverlight devs is up at Silverlightshow and is a great tutorial on frame-based animation. Windows Phone SoundEffect clipping Loek van den Ouweland has some good information about soudn clips on WP7... the solutions aren't always code solutions.... good to know info. Windows Phone 7 Tombstoning with MVVM and Sterling Jeremy Likness is discussing Tombstoning via MVVM and Sterling... read on how Sterling gives you a leg up on the Tombstone express. Video: Reactive Phone Programming For Windows Phone 7 Fitting in nicely with his podcast on Reactive Programming, Jesse Liberty releases a video on Reactive Programming for WP7. Talking about Data Binding in WP7 | Coding4fun TextBoxBinding helper in depth WindowsPhoneGeek's latest post walks through WP7 databinding in detail with lots of good external links, then follows up with a discussion of the Coding4Fun Binding Helpers Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Today's Links (6/30/2011)

    - by Bob Rhubart
    James Gosling Says He Doesn't Care About Java But here's the rest of the story: "What I really care about is the Java Virtual Machine as a concept," says Gosling, "because that is the thing that ties it all together; it's the thing that makes Java the language possible; it's the thing that makes things work on all kinds of different platforms; and it makes all kinds of languages able to coexist." Virtual Developer Day: SOA Accelerate Your Development with Oracle SOA Suite. Learn how in this FREE on-line workshop with Hands-on labs July 12th 9 am to 1:30 PM PST" July 12th 9 am to 1:30 PM PST Podcast: Toronto Architect Day Panel Discussion Part 3 (of 4) is now available, in which the panel (including Oracle ACE Director Cary Millsap and InfoQ editor and co-founder Floyd Marinescu) discusses public vs private cloud as the best strategy for small businesses and start-ups. WebLogic Weekly for June 27th, 2011 | James Bayer Bayer shares the latest resources for those with WebLogic on the brain. Griffiths Waite at Oracle Open World | Mark Simpson Oracle ACE Director Mark Simpson share information on the presentations he's scheduled to give at Oracle OpenWorld San Francisco 2011. Kscope Solid Service Bus Implementations Peter Paul van de Beek's Kscope11 presentation "is aimed at supporting architects and especially developers to choose the right integration infrastructure for a job." Migration To Java EE 6 With Spring 3 - ...Could Become "Interesting" | Adam Bien "Put simply, big data implies datasets so large they can't normally be processed using a standard transactional database," says David Dorf. "The term 'noSQL' is often used in this context as well." Book Review: "Designing With the Mind In Mind" | Abhinav Agarwal According to Abhinav Agarwal, Jeff Johnson's new book is about "the theory of how the mind perceives information, of how humans understand what they read, and how our eyes are attuned to paying attention to not just what's happening in front of us but also at the periphery of our vision." BPM 11g Advanced Workshop | Martien van den Akker Martien van den Akker shares his thoughts on both the workshop he recently attended and on the Oracle BPM 11g product. Fusion Applications - What You Need To Know: Product Families | Floyd Teter "Fusion Applications are organized into seven groups of related products called Product Families," observes Oracle ACE Director Floyd Teter. "While the product features are organized according to the Business Process Model and can cross the boundaries of product families, the product family groupings are an easy way to wrap your mind around Fusion Apps." Grid Control: Refreshing Weblogic Domains | Dave Best Dave Best shares tips for avoiding problems when using grid control to centrally manage/monitor your environment. Webcast: Oracle to Announce Datanomic Integration Plans The combination of Datanomic technology and the previous acquisition of Silver Creek Systems will deliver a complete, integrated and best-of-breed solution for Data Quality. Learn about Oracle’s strategy and product plans and how the new products acquired from Datanomic will impact your organization. July 19, 2011, 8:00am PT / 11:00am ET. Speakers include Michael Weingartner (Vice President, Product Development, Oracle), Martin Boyd (Senior Director, Product Strategy, Oracle), and Dain Hansen (Director, Product Marketing, Fusion Middleware, Oracle).

    Read the article

  • jQuery Validate plugin - password check - minimum requirements - Regex

    - by QviXx
    I've got a little problem with my password-checker. There's got a registration form with some fields. I use jQuery Validate plugin to validate user-inputs. It all works except the password-validation: The password should meet some minimum requirements: minimum length: 8 - I just use 'minlength: 8' at least one lower-case character at least one digit Allowed Characters: A-Z a-z 0-9 @ * _ - . ! At the moment I use this code to validate the password: $.validator.addMethod("pwcheck", function(value, element) { return /^[A-Za-z0-9\d=!\-@._*]+$/.test(value); }); This Code works for the allowed characters but not for minimum requirements. I know that you can use for example (?=.*[a-z]) for a lower-case-requirement. But I just don't get it to work. If I add (?=.*[a-z]) the whole code doesn't work anymore. I need to know how to properly add the code to the existing one. Thank you for your answers! This is the complete code <script> $(function() { $("#regform").validate({ rules: { forename: { required: true }, surname: { required: true }, username: { required: true }, password: { required: true, pwcheck: true, minlength: 8 }, password2: { required: true, equalTo: "#password" }, mail1: { required: true, email: true }, mail2: { required: true, equalTo: "#mail1" } }, messages: { forename: { required: "Vornamen angeben" }, surname: { required: "Nachnamen angeben" }, username: { required: "Usernamen angeben" }, password: { required: "Passwort angeben", pwcheck: "Das Passwort entspricht nicht den Kriterien!", minlength: "Das Passwort entspricht nicht den Kriterien!" }, password2: { required: "Passwort wiederholen", equalTo: "Die Passwörter stimmen nicht überein" }, mail1: { required: "Mail-Adresse angeben", email: "ungültiges Mail-Format" }, mail2: { required: "Mail-Adresse wiederholen", equalTo: "Die Mail-Adressen stimmen nicht überein" } } }); $.validator.addMethod("pwcheck", function(value, element) { return /^[A-Za-z0-9\d=!\-@._*]+$/.test(value); }); }); </script>

    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

  • iphone encode problem with ffmpeg

    - by samantha
    Hi, I need to encode a video from image. I use ffmpeg and compiling rigth. My problem is that when i try to opne video with quicktime on iphone, this give me a message "this movie format is not supported". I create a file mp4 with this parameter on context: context-time_base.num = 1; context-time_base.den = 15; context-codec_type = CODEC_TYPE_VIDEO; context-codec_id = CODEC_ID_H264; context-bit_rate = 1000000; context-width = width; context-height = height; context-keyint_min = 10; context-i_quant_factor = 0.71; context-bit_rate_tolerance = 20000; context-rc_max_rate = 100000; context-rc_buffer_size = 8835000; context-qcompress = 0.6; context-qmin = 10; context-qmax = 30; context-max_qdiff = 4; context-gop_size = 30; context->time_base.num = 1; context-time_base.den = 30; context-sample_aspect_ratio = av_d2q(1, 255); context-profile = 30; context-pix_fmt = PIX_FMT_YUV420P; context-flags |= CODEC_FLAG_LOOP_FILTER; where is my mistake?? thanks

    Read the article

  • Rewriting a for loop in pure NumPy to decrease execution time

    - by Statto
    I recently asked about trying to optimise a Python loop for a scientific application, and received an excellent, smart way of recoding it within NumPy which reduced execution time by a factor of around 100 for me! However, calculation of the B value is actually nested within a few other loops, because it is evaluated at a regular grid of positions. Is there a similarly smart NumPy rewrite to shave time off this procedure? I suspect the performance gain for this part would be less marked, and the disadvantages would presumably be that it would not be possible to report back to the user on the progress of the calculation, that the results could not be written to the output file until the end of the calculation, and possibly that doing this in one enormous step would have memory implications? Is it possible to circumvent any of these? import numpy as np import time def reshape_vector(v): b = np.empty((3,1)) for i in range(3): b[i][0] = v[i] return b def unit_vectors(r): return r / np.sqrt((r*r).sum(0)) def calculate_dipole(mu, r_i, mom_i): relative = mu - r_i r_unit = unit_vectors(relative) A = 1e-7 num = A*(3*np.sum(mom_i*r_unit, 0)*r_unit - mom_i) den = np.sqrt(np.sum(relative*relative, 0))**3 B = np.sum(num/den, 1) return B N = 20000 # number of dipoles r_i = np.random.random((3,N)) # positions of dipoles mom_i = np.random.random((3,N)) # moments of dipoles a = np.random.random((3,3)) # three basis vectors for this crystal n = [10,10,10] # points at which to evaluate sum gamma_mu = 135.5 # a constant t_start = time.clock() for i in range(n[0]): r_frac_x = np.float(i)/np.float(n[0]) r_test_x = r_frac_x * a[0] for j in range(n[1]): r_frac_y = np.float(j)/np.float(n[1]) r_test_y = r_frac_y * a[1] for k in range(n[2]): r_frac_z = np.float(k)/np.float(n[2]) r_test = r_test_x +r_test_y + r_frac_z * a[2] r_test_fast = reshape_vector(r_test) B = calculate_dipole(r_test_fast, r_i, mom_i) omega = gamma_mu*np.sqrt(np.dot(B,B)) # write r_test, B and omega to a file frac_done = np.float(i+1)/(n[0]+1) t_elapsed = (time.clock()-t_start) t_remain = (1-frac_done)*t_elapsed/frac_done print frac_done*100,'% done in',t_elapsed/60.,'minutes...approximately',t_remain/60.,'minutes remaining'

    Read the article

  • Can I use a USB monitor (like Mimo) as a primary monitor?

    - by Eduardo Molteni
    I have an old PC in the den without Video Card (I have to remove it after it start failing). I access it through Remote Desktop. I don't want to invest in a new video card since the PC is old. If I buy a USB monitor I can use it as a secondary monitor in the main pc, and plug to the old PC when need. The question is: Does the USB monitor work during booting before the OS was loaded?

    Read the article

  • What is the cause of these Visual Studio 2010 errors & warnings?

    - by volpack
    I don't know the cause of these errors I am receiving from Visual Studio 2010. This is the code from my program from line 343 to line 408: int create_den_from_img(char *img_file_name_part, int xlen, int ylen, int zlen ) { IplImage* imgs = 0; char str[80]; unsigned char *data,*imgdata; /* allocating memory */ data = (unsigned char *) malloc(xlen * ylen * zlen * sizeof(unsigned char) ); if(data==NULL) { printf("error in allocating memory \n"); exit(1); } /* Getting the filename & iterating through tiff images */ for(int k = 0; k < zlen; k++) { int count=2; int tmp=k+1; while(tmp/10) { count=count-1; tmp=tmp/10; } switch(count) { case 2:sprintf(str,"%s00%d.tif",img_file_name_part,k+1); break; case 1:sprintf(str,"%s0%d.tif",img_file_name_part,k+1); break; default:sprintf(str,"%s%d.tif",img_file_name_part,k+1); break; } printf("%s\n",str); /* Loading Image using OpenCV */ imgs=cvLoadImage(str,-1); if(imgs==NULL) { printf("error in opening image \n"); exit(1); } imgdata=(uchar *)imgs->imageData; for(int j =0; j < ylen; j++) { for(int i =0; i < xlen; i++) { data[ k*xlen*ylen + j*xlen + i ] = imgdata[ j*xlen+i ]; } } cvReleaseImage(&imgs ); } /* populating `data` variable is done. So, calling `write_den` */ if(write_den("test.den",data,xlen,ylen,zlen)==0) { printf("Error in creating den file\n"); exit(1); } printf("Den file created\n"); } These are the list of errors: Error 3 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 358 1 MTP_TEST Error 4 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 358 1 MTP_TEST Error 5 error C2143: syntax error : missing ')' before 'type' c:\examples\denfile.c 358 1 MTP_TEST Error 6 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 358 1 MTP_TEST Error 7 error C2065: 'k' : undeclared identifier c:\examples\denfile.c 358 1 MTP_TEST Error 9 error C2065: 'k' : undeclared identifier c:\examples\denfile.c 358 1 MTP_TEST Error 10 error C2059: syntax error : ')' c:\examples\denfile.c 358 1 MTP_TEST Error 11 error C2143: syntax error : missing ';' before '{' c:\examples\denfile.c 359 1 MTP_TEST Error 12 error C2065: 'k' : undeclared identifier c:\examples\denfile.c 361 1 MTP_TEST Error 13 error C2065: 'k' : undeclared identifier c:\examples\denfile.c 370 1 MTP_TEST Error 14 error C2065: 'k' : undeclared identifier c:\examples\denfile.c 372 1 MTP_TEST Error 15 error C2065: 'k' : undeclared identifier c:\examples\denfile.c 374 1 MTP_TEST Error 16 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 388 1 MTP_TEST Error 17 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 388 1 MTP_TEST Error 18 error C2143: syntax error : missing ')' before 'type' c:\examples\denfile.c 388 1 MTP_TEST Error 19 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 388 1 MTP_TEST Error 20 error C2065: 'j' : undeclared identifier c:\examples\denfile.c 388 1 MTP_TEST Error 22 error C2065: 'j' : undeclared identifier c:\examples\denfile.c 388 1 MTP_TEST Error 23 error C2059: syntax error : ')' c:\examples\denfile.c 388 1 MTP_TEST Error 24 error C2143: syntax error : missing ';' before '{' c:\examples\denfile.c 389 1 MTP_TEST Error 25 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 390 1 MTP_TEST Error 26 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 390 1 MTP_TEST Error 27 error C2143: syntax error : missing ')' before 'type' c:\examples\denfile.c 390 1 MTP_TEST Error 28 error C2143: syntax error : missing ';' before 'type' c:\examples\denfile.c 390 1 MTP_TEST Error 29 error C2065: 'i' : undeclared identifier c:\examples\denfile.c 390 1 MTP_TEST Error 31 error C2065: 'i' : undeclared identifier c:\examples\denfile.c 390 1 MTP_TEST Error 32 error C2059: syntax error : ')' c:\examples\denfile.c 390 1 MTP_TEST Error 33 error C2143: syntax error : missing ';' before '{' c:\examples\denfile.c 391 1 MTP_TEST Error 34 error C2065: 'k' : undeclared identifier c:\examples\denfile.c 392 1 MTP_TEST Error 35 error C2065: 'j' : undeclared identifier c:\examples\denfile.c 392 1 MTP_TEST Error 36 error C2065: 'i' : undeclared identifier c:\examples\denfile.c 392 1 MTP_TEST Error 37 error C2065: 'j' : undeclared identifier c:\examples\denfile.c 392 1 MTP_TEST Error 38 error C2065: 'i' : undeclared identifier c:\examples\denfile.c 392 1 MTP_TEST I've been getting these kind of errors all day long. Sometimes the code compiles, while at other time it doesn't. Its really annoying.

    Read the article

  • Acad 14 SOLIDS disappeared, DWG file doesn't open correctly

    - by MikeD
    I made a drawing in Autocad 14 (Win XP) containing of mostly SOLID's. I saved and re-opened it multiple times without any problem. Before I last saved it I viewed my drawing using the SHADE functions. After re-opening all my SOLIDS have disappeared. I spent numerous hours searching for a solution, tried SATFIX.ARX , AUDIT, RECOVER without success (ACIS error - which should be gone after applying SATFIX), changed my computer locale from German (decimal = comma) to English (decimal = dot) but my screen remains empty (and yes I tried to recover from a .BAK, too) I also tried to export (the non-display drawing) into DXF and can confirm that all my objects are in there, but re-opening the DXF results in a huge ACIS error list again I am desperate - please can someone help - thanks! Mike

    Read the article

  • customizing into a reusable component in flex

    - by Fresher4Flex
    need to make a reusable custom component from the existing code here. So that I can use this code to make this effect(view stack) to work in any direction. In the code it has user specified height and works from downside. I need to make this component customizable, something like user is able do it in any direction.I need it urgently. I appreciate your help. 1)main Application: <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:sh="windowShade.*"> <sh:Shade id="i1" height="15" headerHeight="14" thisHeight="215" alwaysOnTop="false" y="{this.height - 14}"/> </mx:WindowedApplication> 2)Custom Comp: Shade.mxml <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="300" creationComplete="init()" verticalScrollPolicy="off" verticalGap="0" > <mx:Script> <![CDATA[ import mx.core.Container; import mx.core.Application; import mx.controls.Alert; import mx.effects.easing.*; import mx.binding.utils.BindingUtils; /** * Need host to adjust this object to Top */ public var alwaysOnTop:Boolean = false; /** * User can custom the height of this component */ public var thisHeight:int = 0; /** * User can custom the header height of this component */ [Bindable] public var headerHeight:int = 14; /** * The bindable value of this height */ [Bindable] public var tHeight:int = 0; /** * The bindable value of parent height */ [Bindable] public var pHeight:int = 0; /** * Initialize method */ private function init():void { if (this.thisHeight > 0 ) this.height = this.thisHeight; BindingUtils.bindProperty(this, "tHeight",this,"height" ); BindingUtils.bindProperty(this, "pHeight",this.parent,"height" ); } /** * Toggle button */ private function toggleBtn(e:MouseEvent):void { if (this.alwaysOnTop) { var container:Container = Application.application as Container; container.setChildIndex(this.parent, container.numChildren - 1 ); } if ( vs.selectedIndex == 0 ) panelOut.play(); else panelIn.play(); } ]]> </mx:Script> <mx:Move id="panelOut" target="{this}" yTo="{ pHeight - this.tHeight }" effectEnd="vs.selectedIndex = 1" duration="600" easingFunction="Back.easeOut"/> <mx:Move id="panelIn" target="{this}" yTo="{ this.pHeight - headerHeight }" effectEnd="vs.selectedIndex = 0" duration="600" easingFunction="Back.easeIn"/> <mx:VBox horizontalAlign="center" width="100%"> <mx:ViewStack id="vs" width="100%"> <mx:VBox horizontalAlign="center" > <mx:Label text="VBox 1"/> <mx:Image source="@Embed('/windowShade/add.png')" click="toggleBtn(event)"/> </mx:VBox> <mx:VBox horizontalAlign="center"> <mx:Label text="2nd VBox"/> <mx:Image source="@Embed('/windowShade/back.png')" click="toggleBtn(event)"/> </mx:VBox> </mx:ViewStack> </mx:VBox> <mx:VBox id="drawer" height="100%" width="100%" backgroundColor="#000000"> </mx:VBox> </mx:VBox>

    Read the article

  • A Look at the GridView's New Sorting Styles in ASP.NET 4.0

    Like every Web control in the ASP.NET toolbox, the GridView includes a variety of style-related properties, including CssClass, Font, ForeColor, BackColor, Width, Height, and so on. The GridView also includes style properties that apply to certain classes of rows in the grid, such as RowStyle, AlternatingRowStyle, HeaderStyle, and PagerStyle. Each of these meta-style properties offer the standard style properties (CssClass, Font, etc.) as subproperties. In ASP.NET 4.0, Microsoft added four new style properties to the GridView control: SortedAscendingHeaderStyle, SortedAscendingCellStyle, SortedDescendingHeaderStyle, and SortedDescendingCellStyle. These four properties are meta-style properties like RowStyle and HeaderStyle, but apply to column of cells rather than a row. These properties only apply when the GridView is sorted - if the grid's data is sorted in ascending order then the SortedAscendingHeaderStyle and SortedAscendingCellStyle properties define the styles for the column the data is sorted by. The SortedDescendingHeaderStyle and SortedDescendingCellStyle properties apply to the sorted column when the results are sorted in descending order. These four new properties make it easier to customize the appearance of the column by which the data is sorted. Using these properties along with a touch of Cascading Style Sheets (CSS) it is possible to add up and down arrows to the sorted column's header to indicate whether the data is sorted in ascending or descending order. Likewise, these properties can be used to shade the sorted column or make its text bold. This article shows how to use these four new properties to style the sorted column. Read on to learn more! Read More >

    Read the article

  • Oracle Australia Supports MS Sydney to Gong Ride by Chris Sainsbury

    - by user769227
    What is the Sydney to Gong Ride? The Gong Ride is a one of a kind fundraising event. You can pedal 90 km from Sydney to Wollongong on any day of the year but it's only on the first Sunday of November that you'll experience the camaraderie, fellowship, unity, safey, scenery and sense of achievement for pedalling in support of people living with MS. Well done to the 22 members of the Oracle Sydney to Gong ride on Sunday 6 November. For many, this was the first time riding over distance – officially a 90km event, by GPS about 84km. The event started in Sydney Park, Newtown. We left in a few separate groups between 6.30 and 7.30am – and finished with times between 2 hours 45 mins and 6 hours. With 10,000 riders there was a lot of congestion at the start but that soon thinned out as we left Sydney. It was a great spring day for the event but at 34 degrees it was getting pretty warm once we left the shade of the Royal National Park and carried on over the Sea Cliff bridge and down the coast road towards Wollongong. Unfortunately Dan managed to get himself a facial scrub when someone clipped his front wheel on the descent from Bald Hill lookout. No major incidents thankfully and Dan soldiered on. Most importantly everyone had a good time (even Dan) and we raised $5,800 for Multiple Sclerosis Australia. In total more than $3.7m was raised for this good cause.

    Read the article

  • A Look at the GridView's New Sorting Styles in ASP.NET 4.0

    Like every Web control in the ASP.NET toolbox, the GridView includes a variety of style-related properties, including CssClass, Font, ForeColor, BackColor, Width, Height, and so on. The GridView also includes style properties that apply to certain classes of rows in the grid, such as RowStyle, AlternatingRowStyle, HeaderStyle, and PagerStyle. Each of these meta-style properties offer the standard style properties (CssClass, Font, etc.) as subproperties. In ASP.NET 4.0, Microsoft added four new style properties to the GridView control: SortedAscendingHeaderStyle, SortedAscendingCellStyle, SortedDescendingHeaderStyle, and SortedDescendingCellStyle. These four properties are meta-style properties like RowStyle and HeaderStyle, but apply to column of cells rather than a row. These properties only apply when the GridView is sorted - if the grid's data is sorted in ascending order then the SortedAscendingHeaderStyle and SortedAscendingCellStyle properties define the styles for the column the data is sorted by. The SortedDescendingHeaderStyle and SortedDescendingCellStyle properties apply to the sorted column when the results are sorted in descending order. These four new properties make it easier to customize the appearance of the column by which the data is sorted. Using these properties along with a touch of Cascading Style Sheets (CSS) it is possible to add up and down arrows to the sorted column's header to indicate whether the data is sorted in ascending or descending order. Likewise, these properties can be used to shade the sorted column or make its text bold. This article shows how to use these four new properties to style the sorted column. Read on to learn more! Read More >

    Read the article

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